/* ===========================================
   RESPONSIVE STYLES - Mobile & Tablet
   =========================================== */

/* Logo Image Styling */
.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Logo with tagline container */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.logo-tagline {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.logo-tagline .tagline-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(249, 87, 42, 0.5);
}

/* Navbar alignment fix */
.nav-container {
    align-items: center;
}

/* Reset main padding */
main {
    padding-top: 160px !important;
}

/* Hamburger Menu Button (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================================
   TABLET STYLES (769px - 1024px)
   =========================================== */
@media (max-width: 1024px) {
    .logo-img {
        height: 40px;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-visual {
        margin-left: 0;
        align-items: center;
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }

    .floating-card.card-1,
    .floating-card.card-2 {
        transform: none;
    }

    .stats-row {
        gap: 2rem;
    }

    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .inline-fields.triple {
        grid-template-columns: 1fr 1fr;
    }

    .docs-narrow {
        max-width: 80%;
    }

    .analytics-header-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-right {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .hero-stat {
        flex: 1 1 220px;
    }
}

/* ===========================================
   MOBILE STYLES (max-width: 768px)
   =========================================== */
@media (max-width: 768px) {

    /* Show hamburger, hide nav-links by default */
    .hamburger {
        display: flex;
    }

    .navbar {
        z-index: 1200;
    }

    .nav-container {
        flex-wrap: wrap;
        gap: 0.5rem;
        position: relative;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: relative;
        background: var(--bg-card);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 1rem;
        box-shadow: var(--glass-shadow);
        gap: 0.5rem;
        z-index: 150;
        margin-top: 0.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-dropdown {
        width: 100%;
        padding-bottom: 0;
    }

    .nav-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        background: var(--bg-card);
        box-shadow: var(--glass-shadow);
        margin-top: 0.5rem;
        align-items: flex-start;
    }

    .nav-links.active+.nav-actions,
    .nav-actions.active {
        display: flex;
    }

    /* Logo */
    .logo-img {
        height: 35px;
    }

    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-visual {
        margin-left: 0;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .floating-card {
        width: 100%;
        max-width: 250px;
    }

    .floating-card.card-1,
    .floating-card.card-2 {
        transform: none;
    }

    .stats-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    /* Container padding */
    .container {
        padding: 0 1rem;
    }

    /* Main content */
    main {
        padding-top: 100px;
        padding-bottom: 40px;
    }

    /* Forms */
    .auth-container {
        padding: 5rem 1rem 2rem;
    }

    .auth-card {
        padding: 1.25rem;
    }

    .inline-fields,
    .inline-fields.double,
    .inline-fields.triple {
        grid-template-columns: 1fr;
    }

    .search-bar {
        grid-template-columns: 1fr;
    }

    .docs-narrow {
        max-width: 100%;
    }

    /* Admin grid */
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .analytics-shell {
        padding-top: 5.5rem;
    }

    .analytics-grid,
    .summary-grid,
    .channel-grid,
    .analytics-split {
        grid-template-columns: 1fr;
    }

    .analytics-header-card {
        padding: 1.1rem;
    }

    .analytics-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .hero-right {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-stat {
        width: 100%;
    }

    .truncate {
        max-width: 180px;
    }

    /* Steps grid */
    .steps-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.2rem;
        font-size: 0.95rem;
    }

    .btn-full {
        width: 100%;
    }

    /* Typography */
    .section-header h2 {
        font-size: 1.75rem;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    /* Badge */
    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    body.nav-open {
        overflow: hidden;
    }

    /* Mobile dropdowns: hide until opened to avoid large whitespace */
    .nav-dropdown .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 0.5rem;
        margin-top: 0.25rem;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }

    .nav-auth-links {
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===========================================
   SMALL MOBILE STYLES (max-width: 480px)
   =========================================== */
@media (max-width: 480px) {
    .logo-img {
        height: 30px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .floating-card {
        width: 100%;
        max-width: 200px;
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .floating-card h4 {
        font-size: 0.95rem;
    }

    .floating-card p {
        font-size: 0.8rem;
    }

    .navbar {
        padding: 1rem 0;
    }

    main {
        padding-top: 80px;
    }
}
