/* Dr. Pedro Hernandez - Modern Conversion-Focused Design */

:root {
    /* Brand Colors - Medical Professional */
    --primary: #0066CC;
    --primary-dark: #0052A3;
    --primary-light: #3385D6;
    --secondary: #00A8A8;
    --accent: #FF6B35;
    --success: #28A745;
    
    /* Neutrals */
    --dark: #1A1A2E;
    --dark-gray: #2D2D44;
    --gray: #6C757D;
    --light-gray: #E9ECEF;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: var(--space-md);
    font-size: 1.125rem;
    color: var(--dark-gray);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
}

/* Header - Sticky with Phone */
header {
    position: sticky;
    top: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.phone-cta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    white-space: nowrap;
    min-height: 44px; /* Better touch target */
    text-decoration: none;
}

.phone-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.phone-cta svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-appointment {
    padding: var(--space-sm) var(--space-lg);
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-height: 44px; /* Better touch target */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-appointment:hover {
    background: #E55A2B;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    padding: var(--space-xs);
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* Navigation */
nav {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

nav a {
    color: var(--dark);
    font-weight: 500;
    padding: var(--space-xs) 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.9) 0%, rgba(0, 82, 163, 0.9) 100%), url('../images/hero-image.jpg') center/cover;
    color: var(--white);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.hero-text h1 {
    color: var(--white);
    margin-bottom: var(--space-md);
    font-size: clamp(2.5rem, 6vw, 4rem);
}

.hero-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
}

.hero-ctas {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.btn-primary {
    padding: var(--space-md) var(--space-xl);
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    min-height: 44px; /* Better touch target */
    text-align: center;
    justify-content: center;
}

.btn-primary:hover {
    background: #E55A2B;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    padding: var(--space-md) var(--space-xl);
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px; /* Better touch target */
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

/* Email Capture Form */
.email-capture {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.email-capture h3 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.email-capture p {
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
    color: var(--gray);
}

.email-form {
    display: flex;
    gap: var(--space-sm);
}

.email-form input {
    flex: 1;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.email-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.email-form button {
    padding: var(--space-md) var(--space-lg);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.email-form button:hover {
    background: var(--primary-dark);
}

/* Trust Indicators */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
}

.trust-badge {
    text-align: center;
    padding: var(--space-lg);
}

.trust-badge-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.trust-badge-text {
    color: var(--dark-gray);
    font-weight: 500;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.service-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.service-card p {
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

/* Appointment Section */
.appointment-section {
    background: linear-gradient(135deg, var(--off-white) 0%, var(--white) 100%);
    padding: var(--space-3xl) 0;
}

.appointment-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.appointment-form {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: var(--white);
    padding: var(--space-md);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 250px;
}

.cookie-banner-text p {
    margin: 0;
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: var(--primary-light);
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    color: var(--white);
}

.cookie-banner-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.cookie-banner-btn {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    white-space: nowrap;
}

.cookie-banner-btn-accept {
    background: var(--primary);
    color: var(--white);
}

.cookie-banner-btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-banner-btn-decline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-banner-btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-banner-btn:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Sticky CTA Bar */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: var(--white);
    padding: var(--space-md);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    display: none;
}

.sticky-cta.show {
    display: block;
}

.sticky-cta-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.sticky-cta-text {
    flex: 1;
    min-width: 200px;
}

.sticky-cta-buttons {
    display: flex;
    gap: var(--space-sm);
}

.sticky-cta-btn {
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.sticky-cta-btn-primary {
    background: var(--accent);
    color: var(--white);
}

.sticky-cta-btn-secondary {
    background: var(--primary);
    color: var(--white);
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-xs);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Responsive - Tablet and Below */
@media (max-width: 968px) {
    .hero-content,
    .appointment-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .header-content {
        flex-wrap: wrap;
        padding: 0 var(--space-sm);
    }
    
    .logo-img {
        height: 45px;
        max-width: 220px;
    }
    
    nav {
        order: 3;
        width: 100%;
        flex-direction: column;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: var(--space-md);
        margin-top: 0;
    }
    
    nav.active {
        display: flex;
    }
    
    nav a {
        padding: var(--space-sm) var(--space-md);
        border-bottom: 1px solid var(--light-gray);
        width: 100%;
    }
    
    nav a:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }
    
    .header-cta {
        display: none !important; /* Hide on tablet too */
    }
    
    .logo {
        text-align: center;
        flex: 1;
        justify-content: center;
    }
    
    .logo-img {
        height: 40px;
        max-width: 200px;
    }
    
    .mobile-menu-toggle {
        order: -1;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .trust-badges {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    :root {
        --space-3xl: 3rem;
        --space-2xl: 2rem;
        --space-xl: 1.5rem;
        --space-lg: 1.25rem;
        --header-height: 70px;
        --font-size-h1: 2rem;
        --font-size-h2: 1.75rem;
        --font-size-h3: 1.5rem;
    }
    
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    .section {
        padding: var(--space-xl) 0;
    }
    
    /* Header Mobile */
    .header-content {
        height: var(--header-height);
        justify-content: space-between;
        position: relative;
    }
    
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: auto;
        justify-content: center;
    }
    
    .logo-img {
        height: 35px;
        max-width: 180px;
    }
    
    .header-cta {
        display: none !important; /* Hide phone and appointment button on mobile */
    }
    
    .mobile-menu-toggle {
        order: -1;
        margin-right: auto;
        z-index: 10;
    }
    
    /* Hero Mobile */
    .hero {
        padding: var(--space-xl) 0;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
        margin-bottom: var(--space-sm);
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: var(--space-md);
    }
    
    .hero-ctas {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: var(--space-md);
        font-size: 1rem;
    }
    
    .email-capture {
        padding: var(--space-md);
        margin-top: var(--space-lg);
    }
    
    .email-capture h3 {
        font-size: 1.25rem;
    }
    
    .email-form {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .email-form input,
    .email-form button {
        width: 100%;
        padding: var(--space-md);
    }
    
    /* Trust Badges Mobile */
    .trust-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        padding: var(--space-lg) 0;
    }
    
    .trust-badge {
        padding: var(--space-md);
    }
    
    .trust-badge-number {
        font-size: 2rem;
    }
    
    .trust-badge-text {
        font-size: 0.9rem;
    }
    
    /* Services Mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .service-card {
        padding: var(--space-md);
    }
    
    .service-card img {
        height: 180px;
    }
    
    /* Forms Mobile */
    .appointment-form {
        padding: var(--space-md);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--space-md);
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        text-align: center;
    }
    
    /* Sticky CTA Mobile */
    .sticky-cta {
        padding: var(--space-sm);
    }
    
    .sticky-cta-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .sticky-cta-text {
        font-size: 0.9rem;
    }
    
    .sticky-cta-buttons {
        width: 100%;
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .sticky-cta-btn {
        width: 100%;
        padding: var(--space-sm);
    }
    
    /* Cookie Banner Mobile */
    .cookie-banner {
        padding: var(--space-sm);
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .cookie-banner-text {
        min-width: auto;
    }
    
    .cookie-banner-text p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .cookie-banner-actions {
        width: 100%;
        justify-content: stretch;
        gap: var(--space-xs);
    }
    
    .cookie-banner-btn {
        flex: 1;
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }
    
    /* Utility adjustments */
    .text-center {
        text-align: center;
    }
    
    h1, h2, h3, h4 {
        word-wrap: break-word;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    :root {
        --space-3xl: 2.5rem;
        --space-2xl: 1.5rem;
        --font-size-h1: 1.75rem;
        --font-size-h2: 1.5rem;
    }
    
    .logo-img {
        height: 30px;
        max-width: 150px;
    }
    
    .phone-cta {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
    
    .btn-appointment {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .trust-badges {
        grid-template-columns: 1fr;
    }
    
    .trust-badge-number {
        font-size: 2.5rem;
    }
    
    .header-cta {
        flex-direction: column;
        width: auto;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
