/* ========================================
   COLOR SCHEME
   ======================================== */
:root {
    --ocean-navy: #154360;
    --hydro-blue: #1E90FF;
    --aqua-tint: #A8E6FF;
    --pure-white: #FFFFFF;
    --steel-grey: #4A4A4A;
    --light-grey: #F5F5F5;
    --dark-shadow: rgba(21, 67, 96, 0.15);
    
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--steel-grey);
    background-color: var(--pure-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   NAVIGATION BAR
   ======================================== */
.navbar {
    background: linear-gradient(135deg, var(--ocean-navy) 0%, var(--hydro-blue) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px var(--dark-shadow);
}

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

.logo-section {
    display: flex;
    align-items: center;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--pure-white);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.logo-placeholder:hover {
    transform: scale(1.05);
}

.logo-placeholder svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-placeholder .logo-svg {
    display: inline-block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

/* Back button used on service pages */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    background: var(--pure-white);
    color: var(--ocean-navy);
    border-radius: 8px;
    border: 1px solid rgba(21,67,96,0.12);
    box-shadow: 0 6px 16px rgba(21,67,96,0.06);
    font-weight: 600;
    text-decoration: none;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(21,67,96,0.12);
}

.back-button:focus {
    outline: 3px solid rgba(30,144,255,0.18);
}

.back-arrow {
    font-size: 1.05rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--aqua-tint);
    transition: width var(--transition-fast);
}

.nav-link:hover {
    color: var(--aqua-tint);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--pure-white);
    border-radius: 3px;
    transition: all var(--transition-fast);
}

/* Dropdown (Services) */
.has-dropdown {
    position: relative;
}

.has-dropdown > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,245,245,0.98));
    min-width: 220px;
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: none;
    flex-direction: column;
    z-index: 1500;
}

.dropdown li {
    list-style: none;
}

.dropdown a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--ocean-navy);
    text-decoration: none;
    font-weight: 600;
}

.dropdown a:hover {
    background: var(--aqua-tint);
    color: var(--pure-white);
}

/* Show dropdown on hover for desktop */
.has-dropdown:hover .dropdown {
    display: flex;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--ocean-navy) 0%, var(--hydro-blue) 50%, var(--aqua-tint) 100%);
    background-image: url('assets/wave-background.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--pure-white);
    padding: 3.5rem 20px;
    min-height: var(--hero-min-height, 420px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(30px) translateX(-20px); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-title {
    background: linear-gradient(135deg, var(--pure-white) 0%, var(--aqua-tint) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--aqua-tint);
    line-height: 1.5;
}

/* ========================================
   CALL TO ACTION BUTTONS
   ======================================== */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--hydro-blue) 0%, #1A7ACC 100%);
    color: var(--pure-white);
    box-shadow: 0 8px 20px rgba(30, 144, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(30, 144, 255, 0.6);
}

.btn-secondary {
    background: var(--aqua-tint);
    color: var(--ocean-navy);
    box-shadow: 0 8px 20px rgba(168, 230, 255, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: var(--pure-white);
    box-shadow: 0 12px 30px rgba(168, 230, 255, 0.6);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Pulse Animation */
@keyframes pulse {
    0% { box-shadow: 0 8px 20px rgba(30, 144, 255, 0.4); }
    50% { box-shadow: 0 8px 30px rgba(30, 144, 255, 0.8); }
    100% { box-shadow: 0 8px 20px rgba(30, 144, 255, 0.4); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.trust-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--aqua-tint);
    backdrop-filter: blur(10px);
}

.trust-badge p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--pure-white);
}

/* Hero trust badges (replace CTA buttons visually in hero) */
.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: rgba(255,255,255,0.08);
    color: var(--pure-white);
    padding: 0.9rem 1rem;
    border-radius: 10px;
    min-width: 220px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    border-left: 4px solid transparent;
}

.badge-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.badge-text strong {
    display: block;
    font-size: 1rem;
    line-height: 1.1;
}

.badge-sub {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    margin-top: 2px;
}

.badge-emergency { border-left-color: var(--aqua-tint); }
.badge-quote { border-left-color: var(--hydro-blue); }

@media (max-width: 480px) {
    .hero-badges {
        flex-direction: column;
        gap: 0.75rem;
    }

    .badge { min-width: unset; width: 100%; }
}

/* ========================================
   HERO GALLERY
   ======================================== */
.hero-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.gallery-placeholder {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 3/2;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-item {
    width: 100%;
    height: 100%;
    display: none;
}

.gallery-item.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
    padding: 5rem 20px;
    background: var(--light-grey);
}

.section-title {
    font-size: 2.5rem;
    color: var(--ocean-navy);
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--steel-grey);
    text-align: center;
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--pure-white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px var(--dark-shadow);
    border-top: 4px solid var(--hydro-blue);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(30, 144, 255, 0.3);
    border-top-color: var(--aqua-tint);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform var(--transition-fast);
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(10deg);
}

.service-card h3 {
    color: var(--ocean-navy);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--steel-grey);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Make the whole card clickable while preserving layout */
.service-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.service-link .service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-link:focus, .service-link:active, .service-link:hover {
    text-decoration: none;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    padding: 5rem 20px;
    background: var(--pure-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--steel-grey);
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.features-list li {
    padding: 1rem;
    background: linear-gradient(135deg, var(--aqua-tint) 0%, rgba(168, 230, 255, 0.5) 100%);
    border-radius: 8px;
    color: var(--ocean-navy);
    font-weight: 500;
    border-left: 4px solid var(--hydro-blue);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    padding: 5rem 20px;
    background: linear-gradient(135deg, var(--ocean-navy) 0%, var(--hydro-blue) 100%);
    color: var(--pure-white);
}

.contact .section-title,
.contact .section-subtitle {
    color: var(--pure-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

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

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--aqua-tint);
}

.contact-item p {
    color: var(--pure-white);
}

.contact-item a {
    color: var(--aqua-tint);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: var(--pure-white);
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--pure-white);
    color: var(--steel-grey);
    transition: all var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 230, 255, 0.5);
    transform: scale(1.02);
}

.contact-form textarea {
    resize: vertical;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--ocean-navy);
    color: var(--pure-white);
    padding: 3rem 20px 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--aqua-tint);
}

.footer-section p {
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--pure-white);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(168, 230, 255, 0.3);
    color: var(--aqua-tint);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--ocean-navy) 0%, var(--hydro-blue) 100%);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }

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

    /* Mobile: allow submenu toggle visually */
    .has-dropdown .dropdown {
        position: static;
        background: transparent;
        padding: 0;
        box-shadow: none;
        display: none;
    }

    .has-dropdown.open .dropdown {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        margin-top: 0.5rem;
        padding-left: 1rem;
    }

    .dropdown a {
        color: var(--pure-white);
        padding: 0.6rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

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

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
    }

    /* Section Titles */
    .section-title {
        font-size: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

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

    .section-title {
        font-size: 1.8rem;
    }

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

    .logo-placeholder {
        font-size: 1.2rem;
    }

    .logo-placeholder svg {
        width: 30px;
        height: 30px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Floating CTA buttons (always visible) */
.floating-cta {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 3000;
}

.floating-cta .btn {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

/* Smooth hide/show for floating CTAs */
.floating-cta {
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.floating-cta.hidden {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    pointer-events: none;
}

/* Mobile layout: centered and stacked for reachability */
@media (max-width: 768px) {
    .floating-cta {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 18px;
        gap: 10px;
        background: transparent;
        padding: 0 6px;
    }

    .floating-cta .btn {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .floating-cta .btn:first-child {
        order: 2; /* show Emergency as right/bottom item */
    }

    .floating-cta .btn:last-child {
        order: 1;
    }
}

/* Hide floating CTAs when printing */
@media print {
    .floating-cta { display: none !important; }
}

/* ========================================
   PAGE CONTENT UTILITIES (MOBILE-FIRST)
   ======================================== */
.page-section {
    padding: 1.25rem 0;
}

.content-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 12px;
}

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--steel-grey);
}

/* Slightly larger tap targets on mobile */
@media (max-width: 768px) {
    .back-button { padding: 0.75rem 1rem; }
    .btn { padding: 0.9rem 1rem; font-size: 1rem; }
    .section-title { font-size: 1.9rem; }
}

/* Improve spacing for lists on mobile */
.page-section ul, .page-section ol {
    margin-left: 1.1rem;
    margin-top: 0.6rem;
    gap: 0.4rem;
}
