/* 
 * MasterAntigravity - Frontend Stylesheet
 * Separate from the admin panel (css/style.css)
 * GSDM Agency Standard
 */

:root {
    --primary-color: #0056b3;
    --primary-hover: #003d80;
    --secondary-color: #6c757d;
    --accent-color: #e63946;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --footer-bg: #1a1d23;
    --footer-text: #e9ecef;
    --header-bg: #ffffff;
    --nav-link: #333;
    --nav-hover: #0056b3;
    --border-color: #dee2e6;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #faf9fb;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* =====================
   Header & Nav
   ===================== */
header {
    background: var(--header-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
}

.logo img {
    height: 40px;
    display: block;
}

/* Hamburger button */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 44px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 8px;
    z-index: 1100;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--nav-link);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav {
    width: 100%;
    flex-basis: 100%;
}

nav ul {
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 0.25rem;
}

nav ul.open {
    display: flex;
}

nav ul li a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--nav-link);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

nav ul li a:hover {
    background: rgba(0, 86, 179, 0.08);
    color: var(--nav-hover);
}

nav ul li a i {
    margin-right: 0.5rem;
    width: 1.2rem;
    text-align: center;
}

/* Placeholder menu items (no link, used as dropdown parent) */
.nav-placeholder {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--nav-link);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    cursor: default;
}

@media (min-width: 769px) {
    .nav-placeholder {
        padding: 0.5rem 0.85rem;
        font-size: 0.95rem;
    }
}

/* ── Dropdown Menu (Mobile-first) ──────────────────────────────────────── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-arrow {
    font-size: 0.65rem;
    margin-left: 0.3rem;
    transition: transform 0.2s;
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
    /* Larger tap target without affecting layout */
}

/* rotation removed per user request */

/* Mobile: hide by default, show on click toggle */
.nav-dropdown .nav-dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 1rem !important;
    border-top: none !important;
    margin-top: 0 !important;
    text-align: left !important;
    align-items: flex-start !important;
}

.nav-dropdown .nav-dropdown-menu li {
    text-align: left !important;
}

.nav-dropdown .nav-dropdown-menu li a {
    text-align: left !important;
    justify-content: flex-start !important;
}

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

/* Desktop: show on hover */
@media (min-width: 769px) {
    /* Desktop: always show nav, hide hamburger */
    nav ul {
        display: flex !important;
        flex-direction: row;
        border-top: none;
        margin-top: 0;
    }

    .menu-toggle {
        display: none;
    }

    .nav-dropdown {
        position: relative;
    }

    .nav-dropdown .nav-dropdown-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 190px;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        padding: 0.4rem 0 !important;
        z-index: 2000;
        flex-direction: column !important;
        gap: 0 !important;
        text-align: left !important;
        align-items: flex-start !important;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: flex !important;
    }

    .nav-dropdown .nav-dropdown-menu li {
        text-align: left !important;
    }

    .nav-dropdown .nav-dropdown-menu li a {
        padding: 0.55rem 1rem !important;
        font-size: 0.88rem !important;
        white-space: nowrap;
        border-radius: 0 !important;
        text-align: left !important;
        justify-content: flex-start !important;
    }

    .nav-dropdown-menu li a:hover {
        background: rgba(0, 86, 179, 0.08) !important;
    }

    }
}

/* =====================
   Main Content Area
   ===================== */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* =====================
   Cards & Sections
   ===================== */
section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

section h1, section h2 {
    margin-bottom: 1rem;
    color: #ffffff;
}

section h2 i {
    margin-right: 0.5rem;
}

/* =====================
   Alerts
   ===================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =====================
   Buttons
   ===================== */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #5a6268;
}

/* =====================
   Forms
   ===================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.12);
}

/* =====================
   Footer
   ===================== */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: auto;
}

/* ── Nav "Book Appointment" CTA Button ──────────────────────────────── */
nav ul li.nav-cta a {
    background: #0056b3;
    color: #fff !important;
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    transition: background 0.25s, transform 0.2s;
}

nav ul li.nav-cta a:hover {
    background: #003d80;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    nav ul li.nav-cta a {
        display: inline-block;
        margin: 0.25rem 1rem;
    }
}

.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #8ab4f8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links a i {
    margin-right: 0.35rem;
}

.footer-container p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.footer-container a {
    color: #8ab4f8;
    text-decoration: none;
}

.footer-container a:hover {
    text-decoration: underline;
}

/* =====================
   Dashboard / Welcome
   ===================== */
.welcome h1 {
    font-size: 1.75rem;
}

.cta {
    text-align: center;
    padding: 2rem;
}

.cta a {
    color: var(--primary-color);
    font-weight: 600;
}

.dashboard-overview p {
    font-size: 1.05rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    max-width: 800px;
    margin: 2rem 0;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* =====================
   Login Form (frontend)
   ===================== */
.login-form {
    max-width: 420px;
    margin: 3rem auto;
}

.login-form h2 {
    text-align: center;
}

.login-form .hint {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* =====================
   Utility
   ===================== */
.hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.required {
    color: var(--accent-color);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* =====================
   Hero Section
   ===================== */
.hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #002b5e 100%);
    color: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.hero-image {
    flex: 0 0 280px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    max-height: 200px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* =====================
   Features Section
   ===================== */
.features h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: rgba(0, 86, 179, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =====================
   About Section
   ===================== */
.about {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-content {
    flex: 1;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.about-image {
    flex: 0 0 200px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    max-height: 150px;
    opacity: 0.7;
}

/* =====================
   User Quick Stats (logged-in)
   ===================== */
.user-quickstats h2 {
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-value {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-detail {
    font-size: 0.95rem;
    font-weight: 600;
}

/* =====================
   Contact Page
   ===================== */
.contact-page section {
    padding: 2.5rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contact-form-container h2 {
    margin-bottom: 1.5rem;
}

.contact-form-container .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-success {
    text-align: center;
    padding: 2rem;
}

.contact-success i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.contact-success p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Contact Info Sidebar */
.contact-info {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-detail {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-detail i {
    font-size: 1.2rem;
    color: var(--primary-color);
    min-width: 1.5rem;
    margin-top: 0.2rem;
}

.contact-detail strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.contact-detail p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.contact-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 86, 179, 0.08);
    color: var(--primary-color);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.contact-social a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* =====================
   Desktop Navigation
   ===================== */
@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    nav {
        max-height: none !important;
        overflow: visible;
        flex-basis: auto;
        width: auto;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        gap: 0.25rem;
        padding: 0;
        align-items: center;
        border-top: none;
        margin-top: 0;
    }

    nav ul li a {
        padding: 0.5rem 0.85rem;
        font-size: 0.95rem;
    }

    .nav-container {
        flex-wrap: nowrap;
    }
}

@media (min-width: 1024px) {
    main {
        padding: 2.5rem 2rem;
    }
}

/* =====================
   Mobile Responsive
   ===================== */
@media (max-width: 767px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        flex: 0 0 auto;
    }

    .hero-image img {
        max-height: 120px;
    }

    .about {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .about-image {
        flex: 0 0 auto;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-form-container .form-row {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =====================
   Utility: Container
   ===================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* =====================
   Page Section (for generated pages)
   ===================== */
.page-section {
    padding: 3rem 0;
}

.page-section h1 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* ── Nav "Book Appointment" CTA Button ──────────────────────────────── */
nav ul li.nav-cta a {
    background: #0056b3;
    color: #fff !important;
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    transition: background 0.25s, transform 0.2s;
}

nav ul li.nav-cta a:hover {
    background: #003d80;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    nav ul li.nav-cta a {
        display: inline-block;
        margin: 0.25rem 1rem;
    }
}

/* =====================
   Floating WhatsApp Button
   ===================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #1ebe57;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
    animation: none;
}

.whatsapp-float:active {
    transform: scale(0.95);
}

@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 28px rgba(37, 211, 102, 0.7);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 28px;
    }
}
