/* 
   HTS Analiz Pro - Modern SaaS Stylesheet (Concept 2)
   Theme: Light, Airy, Glassmorphism
*/

:root {
    /* Premium Light Theme Palette */
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --primary-color: #6366f1;
    --secondary-color: #0ea5e9;
    --accent-color: #8b5cf6;
    --text-main: #1e293b;
    --text-muted: #4b5563;
    --text-secondary: #374151;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.82);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Vibrant Gradient Palette */
    --grad-indigo: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #3b82f6 100%);
    --grad-blue: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
    --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --grad-surface: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 1) 100%);
}

/* --- Global Overrides --- */
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Vibrant Stat Cards */
.stat-card-vibrant {
    background: var(--grad-indigo);
    color: white !important;
    border-radius: 28px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
}

.stat-card-vibrant .stat-info h3,
.stat-card-vibrant .stat-info p {
    color: white !important;
}

.stat-card-vibrant::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(40px);
}

.progress-circle-svg {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
}

.progress-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 6;
}

.progress-circle-val {
    fill: none;
    stroke: white;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 60;
    transition: stroke-dashoffset 1s ease;
}

/* Glassmorphism Refined */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.glass-effect-strong {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-premium);
}

/* Premium Gradient Utilities */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.gradient-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(99, 102, 241, 0.4);
}

/* Navbar & Resolution Fixes */
.navbar {
    height: 85px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    /* Increased to allow more items */
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 10px;
}

.logo img {
    height: 60px !important;
    width: auto !important;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    /* Reduced gap */
    margin: 0 20px;
    white-space: nowrap;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* Compact gap */
    flex-shrink: 0;
}

.nav-actions .btn {
    padding: 0.6rem 1.2rem;
    /* Smaller buttons in navbar */
    font-size: 0.85rem;
}

.btn-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--text-main);
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

/* Auth Modal Fixes - [CRITICAL] */
.auth-modal {
    max-width: 420px !important;
    padding: 2rem !important;
    display: flex !important;
    flex-direction: column !important;
}

.auth-form {
    display: none !important;
}

.auth-form.active {
    display: flex !important;
    flex-direction: column !important;
}

.auth-form .form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.auth-form input {
    width: 100% !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 10px !important;
}

.social-divider {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 1.5rem 0 !important;
}

.social-divider::before,
.social-divider::after {
    content: "" !important;
    flex: 1 !important;
    height: 1px !important;
    background: #e2e8f0 !important;
}

.social-divider span {
    padding: 0 15px !important;
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-transform: lowercase !important;
    white-space: nowrap !important;
    background: #ffffff !important;
    position: relative;
    z-index: 1;
}

.social-auth {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 1rem 0 !important;
    padding: 0 !important;
}

.social-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    cursor: pointer;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.social-btn:hover {
    background: #f8fafc !important;
    border-color: #d2d4d8 !important;
    transform: translateY(-1px) !important;
}

.g_id_signin {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.g_id_signin:hover {
    transform: translateY(-1px) !important;
}

.g_id_signin iframe {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    border-radius: 4px !important;
}

/* Ensure Google Button fits perfectly */
.g_id_signin {
    overflow: hidden !important;
    border-radius: 4px !important;
    border: none !important;
    /* Google handles its own border inside the iframe */
    padding: 0 !important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Section Titles */
.section-title h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-box.color-1 {
    background: #eef2ff;
    color: #6366f1;
}

.icon-box.color-2 {
    background: #f0f9ff;
    color: #0ea5e9;
}

.icon-box.color-3 {
    background: #f5f3ff;
    color: #8b5cf6;
}

/* Pricing Section Overrides */
.pricing-card {
    background: white;
    border: 1px solid #e2e8f0;
}

.pricing-card.featured {
    background: white;
    border: 2px solid var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.popular-badge {
    background: var(--primary-color);
}

/* Sidebar for Dashboards */
.sidebar {
    background: white !important;
    border-right: 1px solid #e2e8f0;
}

.nav-link {
    color: var(--text-muted) !important;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary-color) !important;
}

.nav-link i {
    color: inherit !important;
}

/* Dashboard Cards */
.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 3D Pricing Carousel */
.pricing-carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 3rem auto;
    height: 550px;
    perspective: 2000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricing-carousel {
    position: relative;
    width: 350px;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card {
    position: absolute;
    width: 350px;
    height: auto;
    min-height: 500px;
    top: 50%;
    left: 50%;
    margin-top: -250px;
    margin-left: -175px;
    backface-visibility: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.pricing-card.active {
    opacity: 1;
    transform: translate3d(0, 0, 150px);
    pointer-events: auto;
    z-index: 10;
}

.pricing-card.prev {
    opacity: 0.4;
    transform: translate3d(-420px, 0, -120px) rotateY(35deg) scale(0.8);
    pointer-events: none;
    z-index: 5;
}

.pricing-card.next {
    opacity: 0.4;
    transform: translate3d(420px, 0, -120px) rotateY(-35deg) scale(0.8);
    pointer-events: none;
    z-index: 5;
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.carousel-nav.prev {
    left: 50px;
}

.carousel-nav.next {
    right: 50px;
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .pricing-carousel-container {
        height: 600px;
    }

    .pricing-carousel,
    .pricing-card {
        width: 300px;
        margin-left: -150px;
    }

    .pricing-card.prev {
        transform: translate3d(-150px, 0, -100px) rotateY(45deg) scale(0.8);
    }

    .pricing-card.next {
        transform: translate3d(150px, 0, -100px) rotateY(-45deg) scale(0.8);
    }

    .carousel-nav.prev {
        left: 10px;
    }

    .carousel-nav.next {
        right: 10px;
    }

    /* Keep admin sidebar dark for authority */
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.6) !important;
}

.admin-sidebar .nav-link.active {
    background: var(--primary-color) !important;
    color: white !important;
}

/* --- Auth Modal (Light Redesign) --- */
.modal-overlay {
    background: rgba(15, 23, 42, 0.45) !important;
    /* Premium Slate Overlay */
    backdrop-filter: blur(12px) !important;
}

.auth-modal {
    background: #ffffff !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    overflow: hidden;
    padding: 2.5rem !important;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 2rem;
}

/* --- Blog Detail Modal --- */
.blog-modal {
    max-width: 800px !important;
    width: 95% !important;
    padding: 0 !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.blog-modal-header {
    padding: 40px 40px 20px 40px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.blog-modal-content {
    padding: 0 40px 40px 40px;
    overflow-y: auto;
    color: #334155;
    line-height: 1.8;
}

.blog-modal-content h3 {
    color: var(--primary-color);
    margin-top: 25px;
    font-size: 1.5rem;
}

.blog-modal-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.blog-modal-content li {
    margin-bottom: 10px;
    list-style: disc;
}

.blog-modal-content p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.blog-modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
}

.auth-modal .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    text-align: left;
}

.auth-footer {
    display: flex;
    justify-content: center;
    /* Center links in footer */
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.auth-modal label {
    color: #64748b !important;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.auth-modal input {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    /* Thick borders for clarity */
    color: #1e293b !important;
    padding: 0.9rem 1rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    outline: none !important;
    transition: var(--transition);
}

.auth-modal input:focus {
    border-color: var(--primary-color) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.social-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #dadce0;
    color: #4267B2;
    transition: var(--transition);
}

.social-btn:hover {
    background: #f8fafc;
    border-color: #d2d4d8;
}

.social-btn i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.social-btn:hover i {
    transform: scale(1.1);
}

.social-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Fix background-clip warning */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Mobile Responsiveness (ADDED) --- */
@media (max-width: 968px) {

    /* Navbar Adjustments */
    .navbar {
        height: auto;
        padding: 15px 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .logo {
        flex-grow: 1;
    }

    .nav-links,
    .nav-actions {
        display: none !important;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 15px;
        background: var(--sidebar-bg);
        padding: 15px !important;
        border-radius: 12px;
        box-shadow: var(--shadow-premium);
        border: 1px solid var(--glass-border);
    }

    .nav-actions {
        margin-top: 0;
        border-top: none;
        border-radius: 0 0 12px 12px;
        padding-top: 0;
    }

    .nav-links {
        border-radius: 12px 12px 0 0;
        margin-bottom: 0;
    }

    .nav-links.active,
    .nav-actions.active {
        display: flex !important;
    }

    .nav-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .nav-actions .btn-icon {
        padding: 10px;
        align-self: center;
    }

    .logo img {
        height: 45px !important;
    }

    .mobile-menu-btn {
        display: block !important;
        /* Force show on mobile */
        font-size: 1.5rem;
        color: var(--text-main);
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

    .hero-section {
        padding-top: 100px !important;
        padding-bottom: 40px !important;
        text-align: center !important;
    }

    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .hero-text {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-text h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }

    .hero-text p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Reduce vertical spacing */
    section {
        padding: 40px 0 !important;
    }

    .hts-info-section .container {
        padding: 30px !important;
    }

    .seo-content-section {
        padding: 30px 0 !important;
    }

    /* Pricing Carousel Flat Fallback for Mobile */
    .pricing-carousel-container {
        height: auto;
        margin: 50px 0;
        display: block;
        perspective: none;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }

    .pricing-carousel {
        width: 100%;
        height: auto;
        display: flex;
        gap: 20px;
        transform: none !important;
    }

    .pricing-card {
        position: relative;
        top: auto;
        left: auto;
        margin: 0;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        min-width: 300px;
        white-space: normal;
        display: inline-block;
        flex: 0 0 auto;
    }

    .pricing-card.prev,
    .pricing-card.next {
        transform: none;
    }

    .carousel-nav {
        display: none;
        /* Hide arrows on mobile, use swipe */
    }

    /* General Layout */
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure mobile menu button is hidden on desktop */
@media (min-width: 969px) {
    .mobile-menu-btn {
        display: none;
    }
}