/**
 * Page Overrides CSS
 * Common styles extracted from inline HTML styles
 * This file should be linked after combined.min.css
 */

/* ===================================
   CSS Variables (Theme Colors)
   =================================== */
:root {
    --color-menu-bg: #ffffff;
    --color-menu-text: #2c3e50;
    --color-highlight: #e74c3c;
    --color-link: #c0392b;
    --color-cta-bg: #f1c40f;
    --color-cta-hover-bg: #f39c12;
    --color-cta-text: #1a1a1a;
    --logo-width: 100px;
    --logo-width-mobile: 80px;
    --leader-height: calc(100vh - 80px);
    --leader-height: calc(100dvh - 80px);
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --footer-color: #2c3e50;
    --menu-color: #2c3e50;
    --menu-dropdown-bg: #ffffff;
    --menu-dropdown-bg-mobile: #ffffff;
    --menu-dropdown-color: #2c3e50;
    --color-brand: #ffffff;
}

/* ===================================
   Hero Section (Leader)
   =================================== */
.leader {
    min-height: var(--leader-height);
    height: var(--leader-height);
    max-height: none;
}

.leader figure {
    height: 100%;
    position: relative;
}

.leader figure::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    pointer-events: none;
}

.leader figure img {
    object-fit: cover;
    object-position: center;
    height: 100%;
    width: 100%;
    min-height: var(--leader-height);
}

.leader-text {
    top: auto;
    bottom: 15%;
    transform: none;
}

.leader-text-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
}

/* ===================================
   Header / Branding
   =================================== */
.header {
    padding: 0.5rem 1rem;
}

.branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Logo fix - prevent stretching */
img.logo {
    width: auto;
    max-width: var(--logo-width-mobile, 60px);
    max-height: 60px;
    height: auto;
    object-fit: contain;
}

@media screen and (min-width: 72rem) {
    img.logo {
        max-width: var(--logo-width, 100px);
        max-height: 80px;
    }
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-menu-text);
    line-height: 1.2;
}

/* ===================================
   Links and Buttons
   =================================== */
.prose a {
    color: #2980b9;
    text-decoration: underline;
    text-decoration-color: #f1c40f;
    text-underline-offset: 3px;
}

.prose a:hover {
    color: #1a5276;
}

.btn--secondary {
    background-color: #2980b9;
    color: #ffffff !important;
    text-decoration: none;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 900;
}

.btn--secondary:hover {
    background-color: #1a5276;
    color: #ffffff !important;
}

/* ===================================
   Sidebar
   =================================== */
.sidebar-offer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #f1c40f;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.sidebar-offer h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-menu-text);
}

.sidebar-offer p {
    margin-bottom: 0.75rem;
    color: #555;
}

.sidebar-offer .btn {
    margin-top: 1rem;
}

/* ===================================
   Contact Form
   =================================== */
.contact-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-cta-bg);
    outline: none;
}

/* ===================================
   Cookie Consent Modal
   =================================== */
#cookieConsentModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#cookieConsentBox {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

#cookieConsentBox h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
}

#cookieConsentBox p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    color: #666;
    font-size: 14px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.cookie-btn-primary {
    background: #1e8449;
    color: #ffffff;
    font-size: 15px;
}

.cookie-btn-primary:hover {
    background: #229954;
}

.cookie-btn-secondary {
    background: #ecf0f1;
    color: #333;
}

.cookie-btn-secondary:hover {
    background: #d5d8dc;
}

#cookieSettingsBtn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #1e8449;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: all 0.3s ease;
}

#cookieSettingsBtn:hover {
    background: #229954;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    #cookieConsentBox {
        padding: 20px;
    }
    .cookie-buttons {
        flex-direction: column;
    }
    .cookie-btn {
        width: 100%;
    }
}

/* ===================================
   Mobile Responsive
   =================================== */
@media (max-width: 768px) {
    :root {
        --leader-height: calc(70vh - 60px);
        --leader-height: calc(70dvh - 60px);
    }
    
    .leader {
        min-height: var(--leader-height);
        height: var(--leader-height);
    }
    
    .leader figure img {
        min-height: var(--leader-height);
        object-position: center 30%;
    }
    
    .leader-text {
        bottom: 8%;
        padding: 0 1rem;
    }
    
    .leader-text h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .leader-text h3 {
        font-size: 1rem;
    }
    
    .brand-name {
        display: none;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

/* Landscape mode fix */
@media (max-width: 768px) and (orientation: landscape) {
    :root {
        --leader-height: auto;
    }
    
    .leader {
        min-height: 350px;
        height: auto;
    }
}

/* ===================================
   Mobile Submenu Fix
   =================================== */
@media (max-width: 1024px) {
    /* Show submenu when parent has .submenu-open class */
    .menu-item.submenu-open > ul.submenu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative;
        background: #f8f9fa;
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        border-radius: 8px;
    }
    
    .menu-item.submenu-open > ul.submenu li {
        padding: 0.25rem 1rem;
    }
    
    .menu-item.submenu-open > ul.submenu li a {
        display: block;
        padding: 0.5rem 0;
        color: #2c3e50;
    }
    
    /* Arrow rotation when open */
    .menu-item.submenu-open > a.hasSubmenu:after {
        content: "\25B4";
    }
}

/* ===================================
   Why Us Section
   =================================== */
.why-us {
    background: #f8f9fa;
    padding: var(--spacing-20) 0;
}

.why-us h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: var(--spacing-12);
}

.why-us-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
    max-width: var(--container-prose);
    margin: 0 auto;
}

.why-us-item h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--spacing-2);
    color: var(--color-menu-text);
}

.why-us-item p {
    color: var(--color-gray-700);
}

@media screen and (min-width: 40rem) {
    .why-us-grid {
        grid-template-columns: 1fr 1fr;
        max-width: var(--container);
    }
}

@media screen and (min-width: 72rem) {
    .why-us-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials {
    background: #fff;
    padding: var(--spacing-20) 0;
}

.testimonials h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: var(--spacing-12);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
}

.testimonial-card blockquote {
    background: #f8f9fa;
    border-left: 4px solid var(--color-cta-bg);
    padding: var(--spacing-8);
    border-radius: 0 8px 8px 0;
    margin: 0;
}

.testimonial-card blockquote p {
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    color: var(--color-gray-800);
    margin-bottom: var(--spacing-4);
    font-style: italic;
}

.testimonial-card blockquote cite {
    font-style: normal;
    font-weight: var(--font-semibold);
    color: var(--color-gray-700);
}

@media screen and (min-width: 72rem) {
    .testimonials-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ===================================
   Service Areas Summary Section
   =================================== */
.service-areas-summary {
    background: var(--color-gray-100);
    padding: var(--spacing-20) 0;
    text-align: center;
}

.service-areas-summary h2 {
    margin-top: 0;
    margin-bottom: var(--spacing-8);
}

.service-areas-summary p {
    max-width: var(--container-prose);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-6);
    color: var(--color-gray-800);
}

.service-areas-summary .areas-list {
    font-weight: var(--font-semibold);
    color: var(--color-gray-900);
}

.service-areas-summary .btn {
    margin-top: var(--spacing-4);
}

/* ===================================
   Service Cards
   =================================== */
.service-card {
    margin-top: 2rem;
}

.service-card > a:last-child {
    background-color: #2980b9;
    color: #ffffff !important;
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-size: var(--text-lg);
    margin-top: 1rem;
}

.service-card > a:last-child:hover {
    background-color: #1a5276;
    color: #ffffff !important;
}
