﻿:root {
    --primary: #1d6d96;
    --primary-dark: #155a7c;
    --primary-light: #2a8bb8;
    --accent: #ff7e5f;
    --light: #f8fafc;
    --dark: #333;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    padding-top: 70px;
}

/* Notification Styles - Top Middle Position */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 400px;
    width: 90%;
    animation: slideInFromTop 0.3s ease-out;
    text-align: center;
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
    border-left: 4px solid #047857;
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-left: 4px solid #b91c1c;
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-left: 4px solid #b45309;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

.notification-message {
    font-size: 14px;
    opacity: 0.9;
}

@keyframes slideInFromTop {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.notification.fade-out {
    animation: slideOutToTop 0.3s ease-in forwards;
}

@keyframes slideOutToTop {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        max-width: 95%;
        padding: 12px 15px;
    }
    
    .notification-title {
        font-size: 15px;
    }
    
    .notification-message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .notification {
        top: 5px;
        max-width: 98%;
        padding: 10px 12px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}

/* ========== CONSISTENT HEADER STYLES ========== */
header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 8px 5%;
    background-color: #ecf5ff;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-circle img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.clinic-info h1 {
    font-size: clamp(12px, 3vw, 15px);
    text-align: left;
    color: #333;
    margin: 0 0 5px 0;
}

.clinic-info p {
    font-size: clamp(8px, 2.5vw, 10px);
    color: #555;
    margin: 0;
}

/* Mobile menu button - hidden on desktop */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    color: #0066cc;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background: rgba(0, 102, 204, 0.1);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(5px, 4vw, 25px);
    flex: 1;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: clamp(10px, 3vw, 12px);
    transition: color 0.3s;
    white-space: nowrap;
}

.main-nav a:hover {
    color: #0066cc;
}

.main-nav a.active {
    color: #0056b3;
    font-weight: bold;
}

.header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex-shrink: 1;
}

.profile-icon i {
    color: royalblue;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
}

.auth-link {
    text-decoration: none;
    color: #0066cc;
    font-weight: 600;
    font-size: clamp(10px, 3vw, 12px);
    white-space: nowrap;
}

.welcome-text {
    font-weight: 700;
    font-size: clamp(10px, 3vw, 12px);
    color: #003366;
    white-space: nowrap;
}

/* ========== MOBILE-ONLY HEADER RESTRUCTURING ========== */
/* This ONLY applies to screens 768px and below */

@media (max-width: 768px) {
    body {
        padding-top: 65px;
    }
    
    /* Change header to grid layout for reordering */
    header {
        display: grid;
        grid-template-areas: 
            "logo hamburger"
            "user user"
            "nav nav";
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
    }
    
    /* Assign grid areas */
    .logo-container {
        grid-area: logo;
    }
    
    .mobile-menu-btn {
        grid-area: hamburger;
        display: block;
        justify-self: end;
        padding: 6px 8px;
    }
    
    .header-right {
        grid-area: user;
        justify-content: flex-end;
        width: 100%;
        padding-top: 5px;
        border-top: 1px solid rgba(0, 102, 204, 0.1);
        margin-top: 0;
    }
    
    /* FIXED: Horizontal navigation - SIDE BY SIDE (NO absolute positioning) */
    .main-nav {
        grid-area: nav;
        display: none;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100%;
        padding: 10px 12px !important;
        background: #ecf5ff;
        border-top: 1px solid #d0e0f0;
        border-bottom: 1px solid #d0e0f0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        margin-top: 0;
    }
    
    .main-nav.show {
        display: flex !important;
    }
    
    .main-nav a {
        white-space: nowrap;
        padding: 6px 0 !important;
        width: auto !important;
        text-align: center;
        font-size: 13px;
        border-bottom: none !important;
        background: none;
    }
    
    .main-nav a:last-child {
        border-bottom: none;
    }
    
    /* Adjust logo sizes for mobile */
    .logo-circle {
        width: 32px;
        height: 32px;
    }
    
    .logo-circle img {
        width: 36px;
        height: 36px;
    }
    
    .clinic-info h1 {
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .clinic-info p {
        font-size: 7px;
    }
    
    /* Header right spacing */
    .header-right {
        gap: 8px;
    }
    
    .profile-icon i {
        font-size: 14px;
    }
    
    .welcome-text {
        font-size: 10px;
        white-space: nowrap;
    }
    
    .welcome-text .auth-link,
    .header-right .auth-link {
        font-size: 10px;
        white-space: nowrap;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
    
    header {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .logo-circle {
        width: 28px;
        height: 28px;
    }
    
    .logo-circle img {
        width: 32px;
        height: 32px;
    }
    
    .clinic-info h1 {
        font-size: 9px;
    }
    
    .clinic-info p {
        font-size: 6px;
    }
    
    .mobile-menu-btn {
        padding: 5px 8px;
        font-size: 16px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .profile-icon i {
        font-size: 12px;
    }
    
    .welcome-text {
        font-size: 9px;
        white-space: nowrap;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .welcome-text .auth-link,
    .header-right .auth-link {
        font-size: 9px;
    }
    
    /* On very small screens, nav links may wrap */
    .main-nav {
        gap: 10px !important;
        padding: 8px 10px !important;
    }
    
    .main-nav a {
        font-size: 12px;
    }
}

/* Clinic Hours List */
.clinic-hours-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
}

.clinic-hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.3rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.clinic-hours-item:hover {
    background: #e2e8f0;
    transform: translateX(4px);
}

.clinic-hours-item:last-child {
    margin-bottom: 0;
}

.clinic-day {
    color: #374151;
    font-weight: 500;
}

.clinic-status {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.clinic-status.open {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.clinic-status.closed {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Hero Section */
.contact-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.contact-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
}

.contact-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.emergency-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 126, 95, 0.9);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
}

.emergency-badge i {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Contact Section */
.contact-section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 5rem;
}

/* Contact Form */
.contact-form-container {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.contact-form-container h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form-container h3 i {
    color: var(--accent);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 109, 150, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.pre-filled-field {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
}

.pre-filled-field:focus {
    background-color: #f8f9fa;
    border-color: var(--primary);
}

.file-upload {
    border: 2px dashed var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    background: #fafafa;
}

.file-upload:hover {
    border-color: var(--primary);
    background: #f0f8ff;
}

.file-upload label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.file-input {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.file-hint {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.form-button {
    text-align: center;
    margin-top: 1.5rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(29, 109, 150, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(29, 109, 150, 0.4);
}

.submit-btn:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Contact Info Cards */
.contact-info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.info-card.map-card {
    grid-column: 1 / -1;
    padding: 0;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.card-header h4 {
    font-size: 1.4rem;
    color: var(--primary);
}

.card-content p {
    margin-bottom: 1rem;
    color: var(--gray);
}

.card-content ul {
    list-style: none;
    padding-left: 0;
}

.card-content li {
    margin-bottom: 0.5rem;
    color: var(--gray);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.card-content li i {
    color: var(--primary);
    margin-top: 3px;
}

.map-container {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 1rem;
}

.directions-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 109, 150, 0.3);
}

/* Additional Info Section */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 3rem 2rem;
    background: #f8fafc;
}

.info-box {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    text-align: center;
}

.info-box:hover {
    transform: translateY(-5px);
}

.info-box i {
    font-size: 2.5rem;
    color: #1d6d96;
    margin-bottom: 1rem;
}

.info-box h4 {
    font-size: 1.3rem;
    color: #1d6d96;
    margin-bottom: 1rem;
}

.info-box p {
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .main-nav {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .contact-hero h1 {
        font-size: 2.5rem;
    }
    
    .contact-hero {
        padding: 3rem 1.5rem;
    }
    
    .contact-section {
        padding: 3rem 1.5rem;
    }
    
    .contact-form-container {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .contact-hero h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .footer-wrapper {
        flex-direction: column;
    }
}