/* Landing Page Styles - Optimized */

/* Base styles */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

/* CSS Variables */
:root {
    --seodada-gradient: linear-gradient(135deg, #273879 0%, #0f74b2 100%);
    --seodada-gradient-hover: linear-gradient(135deg, #1e2a5a 0%, #0c5a8b 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    --shadow-md: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1);
    --primary: #273879;
    --primary-light: #0f74b2;
    --text-light: #64748b;
}

/* Utility classes */
.gradient-text {
    background: linear-gradient(90deg, #273879, #0f74b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-text-light { color: #6b7280; }

/* Navigation */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: transform 0.5s ease;
    transform: skewX(-15deg);
}

.btn:hover::before { transform: translateX(200%) skewX(-15deg); }
.btn:active { transform: translateY(0.0625rem); }

.btn-primary {
    background: var(--seodada-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--seodada-gradient-hover);
    transform: translateY(-0.1875rem);
    box-shadow: var(--shadow-md);
}

/* Dropdown */
.dropdown-menu {
    min-width: 200px;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1), 0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, 0.1);
    border: none;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:active,
.dropdown-item:focus {
    background: linear-gradient(135deg, #273879, #0f74b2);
    color: white !important;
}

.dropdown-toggle::after { display: none !important; }

.dropdown-caret {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    margin-left: 0.35rem;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-caret { transform: rotate(180deg); }

/* Services dropdown */
.services-dropdown { position: relative; }

.services-dropdown .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.services-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.services-dropdown:hover .dropdown-caret { transform: rotate(180deg); }

/* User dropdown */
.user-dropdown .btn { max-width: 200px; overflow: hidden; }

.user-dropdown .btn .user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    display: inline-block;
}

/* Elegant link animation */
.elegant-link {
    position: relative;
    display: inline-block;
}

.elegant-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -2px;
    left: 0;
    background-color: #273879;
    transition: width 0.3s ease;
}

.elegant-link:hover::after { width: 100%; }

.dropdown-toggle.elegant-link::after {
    content: '' !important;
    border: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 1.5px !important;
    bottom: -2px !important;
    left: 0 !important;
    background-color: #273879 !important;
    transition: width 0.3s ease !important;
    display: block !important;
}

.dropdown-toggle.elegant-link:hover::after { width: 100% !important; }
.dropdown-toggle.elegant-link:hover { text-decoration: none !important; }

/* Logo carousel */
.logo-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-track {
    display: flex;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2rem;
}

.logo-item.center { transform: scale(1.2); opacity: 1; }
.logo-item.center img { filter: grayscale(0%); }

.logo-item img {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.logo-item img:hover { filter: grayscale(0%); }
.special-logo img { height: 50px !important; width: auto !important; }
.logo-carousel:hover .logo-track { animation-play-state: paused; }

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Logo display */
.logo-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.logo-image {
    object-fit: contain;
    max-width: 100%;
    height: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100px;
    min-height: 100px;
}

.logo-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.logo-container img {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.7);
    transition: filter 0.3s ease;
}

.logo-container:hover img { filter: grayscale(0); }

/* Cards */
.card-hover { transition: transform 0.4s ease, box-shadow 0.4s ease; }

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px -5px rgba(39, 56, 121, 0.1), 0 8px 10px -5px rgba(39, 56, 121, 0.04);
}

.depth-card {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.depth-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.how-it-works-card {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.how-it-works-card:hover {
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
    transform: translateY(-6px);
}

.floating-card {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item {
    opacity: 0;
    transform: translateY(15px);
}

@keyframes fadeIn { to { opacity: 1; } }

/* Blob background */
.subtle-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(180deg, rgba(39, 56, 121, 0.06) 0%, rgba(15, 116, 178, 0.06) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(50px);
    z-index: 0;
    animation: subtle-blob-animation 25s infinite alternate;
}

@keyframes subtle-blob-animation {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg); }
    50% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(1deg); }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg); }
}

/* CSS Background (replaces Three.js canvas) */
#css-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(39, 56, 121, 0.08), rgba(15, 116, 178, 0.08));
    animation: float 20s infinite ease-in-out;
}

.bg-particle:nth-child(1) { width: 400px; height: 400px; top: 10%; left: 10%; animation-delay: 0s; }
.bg-particle:nth-child(2) { width: 300px; height: 300px; top: 60%; right: 10%; animation-delay: -7s; }
.bg-particle:nth-child(3) { width: 250px; height: 250px; bottom: 10%; left: 30%; animation-delay: -14s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: right 0.3s ease;
    z-index: 9999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active { right: 0; }

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.hamburger {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: #1e293b;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger span:nth-child(1),
.hamburger span:nth-child(2) { margin-bottom: 6px; }

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.mobile-menu-item {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.active .mobile-menu-item { opacity: 1; transform: translateX(0); }
.mobile-menu.active .mobile-menu-item:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu-item:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-menu-item:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu-item:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.active .mobile-menu-item:nth-child(5) { transition-delay: 0.5s; }
.mobile-menu.active .mobile-menu-item:nth-child(6) { transition-delay: 0.6s; }

/* Border animation */
.border-animation {
    position: relative;
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: all 0.4s ease;
}

.border-animation::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -1px;
    border-radius: inherit;
    background: linear-gradient(to right, #273879, #0f74b2);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.border-animation:hover::before { opacity: 0.1; }

.border-animation:hover {
    border: 1px solid #273879;
    box-shadow: 0 0 20px rgba(39, 56, 121, 0.15);
}

/* Hidden elements */
.website-name { display: none !important; }

/* Responsive */
@media (max-width: 1024px) {
    .user-dropdown .btn { max-width: 120px; padding: 0.5rem 0.75rem; }
    .user-dropdown .btn .user-name { max-width: 60px; font-size: 0.75rem; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; line-height: 1.2; }
    .hero-description { font-size: 1.1rem; }
    .subtle-blob { width: 400px; height: 400px; }
    .logo-item { margin: 0 1rem; }
    .logo-item img { height: 40px; width: 80px; }
    .logo-container { padding: 1rem; height: 80px; min-height: 80px; }
    .logo-container img { max-width: 100px; max-height: 50px; }

    body, html {
        width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    footer {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        transform: translateX(-50%) !important;
    }

    footer > div { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
}

@media (max-width: 640px) {
    .hero-title { font-size: 2rem; }
    .hero-description { font-size: 1rem; }
    .logo-container { padding: 0.75rem; height: 70px; min-height: 70px; }
    .logo-container img { max-width: 80px; max-height: 40px; }
    .mobile-menu { width: 280px; max-width: 85vw; }
    .container { max-width: 100%; overflow-x: hidden; }
}

@media (max-width: 480px) {
    .mobile-menu { width: 260px; max-width: 90vw; }
    .mobile-menu .p-4 { padding: 1rem; }
}
