.emergency-number {
    /* ...ostali stilovi... */
    animation: pulse-btn 1.8s ease-in-out infinite;
}

@keyframes pulse-btn {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.045);
        opacity: 0.92;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .emergency-number {
        font-size: 1rem;
        padding: 10px 10px 10px 32px;
        white-space: nowrap;
        min-width: 0;
        max-width: 100vw;
        overflow: hidden;
        pointer-events: auto !important;
        cursor: pointer;
    }

    .emergency-number i {
        margin-right: 6px;
        pointer-events: none;
    }
}

/* Neon animated border for .emergency-number using 4 spans */
.emergency-number {
    position: relative;
    display: inline-block;
    padding: 18px 36px 18px 48px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
    overflow: hidden;
    letter-spacing: 2px;
    box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.08);
    border: none;
}

.emergency-number span {
    position: absolute;
    display: block;
    border-radius: 12px;
    pointer-events: none;
}

.emergency-number span:nth-child(1) {
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2563EB, #C41E3A);
    animation: neon-anim-1 2s linear infinite;
}

@keyframes neon-anim-1 {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

.emergency-number span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #2563EB, #C41E3A);
    animation: neon-anim-2 2s linear infinite;
    animation-delay: 0.5s;
}

@keyframes neon-anim-2 {
    0% {
        top: -100%;
    }

    50%,
    100% {
        top: 100%;
    }
}

.emergency-number span:nth-child(3) {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(270deg, #C41E3A, #2563EB);
    animation: neon-anim-3 2s linear infinite;
    animation-delay: 1s;
}

@keyframes neon-anim-3 {
    0% {
        right: -100%;
    }

    50%,
    100% {
        right: 100%;
    }
}

.emergency-number span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(360deg, #C41E3A, #2563EB);
    animation: neon-anim-4 2s linear infinite;
    animation-delay: 1.5s;
}

@keyframes neon-anim-4 {
    0% {
        bottom: -100%;
    }

    50%,
    100% {
        bottom: 100%;
    }
}

.emergency-number i {
    position: relative;
    z-index: 1;
    margin-right: 10px;
}

.emergency-number {
    z-index: 0;
}

.emergency-number span,
.emergency-number i {
    pointer-events: none;
}

.emergency-number {
    pointer-events: auto !important;
}

/* Force clickable on all devices */
a.emergency-number {
    pointer-events: auto !important;
    cursor: pointer !important;
}

a[href*="tel:"] {
    pointer-events: auto !important;
}

/* FAQ sekcija - jedan red na desktopu */
@media (min-width: 1024px) {
    #faq .services-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-2xl, 2rem);
    }
}

/* Main services section: 3 in a row on desktop */
@media (min-width: 1024px) {
    #services .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2xl);
    }
}

@media (min-width: 1024px) {
    #certificates .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2xl);
    }
}

/* Rezervacija prevoza section grid wider on desktop */
@media (min-width: 1024px) {
    .features .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }
}

/* Rezervacija prevoza left column spacing on desktop */


.service-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
}

.why-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
}

/* Why Us grid cards */
.why-us-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.why-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.why-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.why-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .why-us-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-2xl);
    }
}

/* ===================================
   TRANSCARE MED - MODERN RESPONSIVE CSS
   Mobile First Design
   Colors: Modern Red (#C41E3A) & Modern Blue (#2563EB)
   =================================== */

/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Color Palette */
    --primary-red: #C41E3A;
    --primary-blue: #2563EB;
    --secondary-red: #DC2626;
    --secondary-blue: #1D4ED8;
    --light-red: #FEE2E2;
    --light-blue: #DBEAFE;
    --dark-gray: #1F2937;
    --medium-gray: #6B7280;
    --light-gray: #F9FAFB;
    --white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Poppins', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ===== BASE TYPOGRAPHY ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent horizontal overflow */
section,
main,
header,
footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Allow fixed elements to work properly */
.mobile-menu,
.mobile-menu-overlay {
    overflow-x: visible !important;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent flex and grid overflow */
.features-grid,
.services-grid,
.footer-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Using hero-ambulance over hero background; strip-based styles removed */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 2rem;
    color: var(--dark-gray);
}

h2 {
    font-size: 1.75rem;
    color: var(--dark-gray);
}

h3 {
    font-size: 1.5rem;
    color: var(--dark-gray);
}

h4 {
    font-size: 1.25rem;
    color: var(--medium-gray);
}

p {
    margin-bottom: var(--space-md);
    color: var(--medium-gray);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-blue);
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    width: 100%;
    box-sizing: border-box;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--secondary-red));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* Improve contrast of outline button on dark CTA section */
.cta-section .btn-outline {
    border-color: #ffffff;
    color: #ffffff;
}

.cta-section .btn-outline:hover,
.cta-section .btn-outline:focus {
    background: #ffffff;
    color: var(--dark-gray);
    box-shadow: var(--shadow-lg);
}

.btn-cta {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
    color: var(--white);
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn-cta:hover::before {
    left: 100%;
}

/* High-contrast hero CTA so it's visible over blue gradient */
.hero .btn-cta {
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.hero .btn-cta:hover,
.hero .btn-cta:focus {
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.35);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    height: 70px;
    overflow-y: hidden;
    /* prevent vertical scrollbar inside header */
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-red);
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: var(--space-sm);
}

.nav-menu {
    display: none;
    list-style: none;
    gap: var(--space-xl);
}

.nav-link {
    color: var(--dark-gray);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-red);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
}

.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
}

/* Global mobile menu overlay to cover viewport on all sizes */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
    pointer-events: none;
    /* no clicks when hidden */
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* capture clicks when visible */
}

.mobile-menu-list {
    list-style: none;
}

.mobile-menu-item {
    padding: 0.2rem var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
}

.mobile-menu-link {
    color: var(--dark-gray);
    font-weight: 500;
    display: block;
}

/* Emergency Contact in Header */
.header-contact {
    display: none;
    align-items: center;
    gap: var(--space-sm);
    color: var(--primary-red);
    font-weight: 600;
}

.header-contact i {
    font-size: 1.25rem;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/MAN_2730.jpg') center 60%/cover no-repeat;
    color: var(--white);
    padding: 120px 0 var(--space-3xl);
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

@media (max-width: 767px) {
    .hero {
        background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/MAN_2734.jpg') center 50%/cover no-repeat;
        min-height: 550px;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
    color: rgba(255, 255, 255, 0.98);
    /* stronger contrast over gradient */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    font-weight: 500;
}

/* Ambulance animation over hero background */
.hero .hero-ambulance {
    position: absolute;
    left: -160px;
    /* place immediately under the fixed header by default (tablet baseline: 70px) */
    top: 70px;
    width: 80px;
    height: auto;
    /* face right while moving right; no vertical shift */
    transform: scaleX(-1);
    animation: driveAcross 8s linear infinite;
    pointer-events: none;
    z-index: 3;
    /* above hero content, below header (9999) */
}

@keyframes driveAcross {
    0% {
        left: -160px;
    }

    100% {
        left: 110%;
    }
}

@media (min-width: 768px) {
    .hero .hero-ambulance {
        top: 70px;
        /* header is 70px on this range */
        width: 100px;
    }
}

@media (min-width: 1024px) {
    .hero .hero-ambulance {
        top: 55px;
        /* tighter header on desktop */
        width: 120px;
    }
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

.emergency-number {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.emergency-number:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    color: var(--white);
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: var(--space-3xl) 0;
    background: var(--light-gray);
    /* remove internal vertical scrollbar caused by hover transforms/shadows */
    overflow-y: hidden;
}

/* Story + Equipment wide row layout */
.story-equipment-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.story-block,
.equipment-block {
    width: 100%;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    overflow: hidden;
    /* prevent micro scroll from shadows/transforms */
}

.feature-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: var(--white);
    font-size: 1.5rem;
}

.feature-card h3 {
    color: var(--dark-gray);
    margin-bottom: var(--space-md);
}

/* Contact: Coverage grid equal layout */
#coverage-grid {
    grid-template-columns: 1fr;
}

#coverage-grid .feature-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 768px) {
    #coverage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #coverage-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Prevent initial animation-induced overflow in Features/Services */
.features .animate-fade-in-up,
.features .animate-fade-in-left,
.features .animate-fade-in-right,
.services .animate-fade-in-up,
.services .animate-fade-in-left,
.services .animate-fade-in-right {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: var(--space-3xl) 0;
    /* remove internal vertical scrollbar caused by hover transforms/shadows */
    overflow-y: hidden;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: stretch;
    overflow: hidden;
    /* prevent micro scroll from shadows/transforms */
}

/* Better layout for the two-column service rows inside #main-services */
#main-services .services-grid {
    align-items: stretch;
}

#main-services .service-item .service-content {
    padding: var(--space-2xl) var(--space-xl);
}

#main-services .service-item img {
    border-radius: 0;
    display: block;
}

.service-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Stronger shadows only inside the Services section */
.services .service-item {
    box-shadow: var(--shadow-lg);
}

.services .service-item:hover {
    box-shadow: var(--shadow-xl);
}

/* Disable hover lift on touch devices to avoid tiny vertical scrollbars */
@media (hover: none) {

    .feature-card:hover,
    .service-item:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }

    /* Avoid hover-induced layout shifts on touch devices */
    .btn:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-outline:hover,
    .emergency-number:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
}

.service-image {
    height: 200px;
    background: linear-gradient(135deg, var(--light-red), var(--light-blue));
    position: relative;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.service-item:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* Push CTA buttons to bottom inside each card */
.service-content .btn {
    margin-top: auto;
}

/* Main services: 3 in a row on larger screens with image on top */
#main-services-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    #main-services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2xl);
    }

    #main-services-grid .service-item {
        display: flex;
        flex-direction: column;
    }

    #main-services-grid .service-item .service-image {
        order: 0;
    }

    #main-services-grid .service-item .service-content {
        order: 1;
    }
}

.service-content h3 {
    color: var(--primary-red);
    margin-bottom: var(--space-md);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--dark-gray), var(--medium-gray));
    color: var(--white);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><path d="M30 0L60 30L30 60L0 30Z" fill="white" opacity="0.05"/></svg>') repeat;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: var(--space-lg);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--medium-gray);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--medium-gray);
    padding-top: var(--space-lg);
    text-align: center;
    color: var(--medium-gray);
}

/* ===== CONTACT FORM ===== */
.contact-form {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.error {
    border-color: var(--primary-red);
}

.error-message {
    color: var(--primary-red);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

/* ===== MAP CONTAINER ===== */
.map-container {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-xl);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN - MOBILE ===== */
@media (max-width: 767px) {

    /* Prevent horizontal scrolling */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure emergency number is clickable on mobile */
    .emergency-number {
        pointer-events: auto !important;
        cursor: pointer;
        z-index: 100;
    }

    .emergency-number span {
        pointer-events: none;
    }

    .emergency-number i {
        pointer-events: none;
    }

    .container {
        padding: 0 var(--space-sm);
        box-sizing: border-box;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }

    /* Prevent tiny vertical scrollbar in features section on mobile */
    .features {
        overflow-y: hidden;
    }

    /* Clip animation overflow inside features container on mobile */
    .features .container {
        overflow: hidden;
    }

    /* Ensure grids don't leak shadows/transforms and cause micro scroll */
    .features-grid,
    .services-grid {
        overflow: hidden;
    }

    /* Disable entry animations on mobile to avoid transform overflow */
    .animate-fade-in-up,
    .animate-fade-in-left,
    .animate-fade-in-right {
        animation: none !important;
        transform: none !important;
    }

    .header {
        height: 60px;
        z-index: 9999;
        width: 100%;
        box-sizing: border-box;
        padding-left: 0;
        padding-right: 0;
    }

    .header .container {
        padding: 0 var(--space-sm);
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .nav {
        padding: var(--space-sm) 0;
        min-height: 60px;
        box-sizing: border-box;
        flex-wrap: nowrap;
        overflow: hidden;
        gap: var(--space-xs);
        width: 100%;
        max-width: 100%;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        font-size: 1rem;
        z-index: 10000;
        position: relative;
        white-space: nowrap;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 50px);
        flex: 1 1 auto;
    }

    .logo img {
        height: 32px;
        flex-shrink: 0;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        position: relative;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        min-width: 44px;
        padding: 0;
        margin: 0 0 0 auto;
        border-radius: var(--radius-sm);
        transition: background-color 0.2s ease;
        background: transparent;
        border: 1px solid transparent;
        cursor: pointer;
        color: var(--dark-gray);
        font-size: 1.5rem;
    }

    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus {
        background-color: var(--light-gray);
        border-color: var(--primary-red);
        outline: none;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 10001;
        /* above overlay (9000), below header (9999) */
        overflow-y: auto;
        padding-top: 60px;
        display: block;
        /* keep block; visibility via transform */
    }

    .mobile-menu.active {
        transform: translateX(0) !important;
    }

    .mobile-menu-list {
        padding: var(--space-lg) 0;
        list-style: none;
        margin: 0;
    }

    .mobile-menu-item {
        border-bottom: 1px solid var(--light-gray);
        margin: 0;
    }

    .mobile-menu-link {
        display: block;
        padding: var(--space-lg);
        color: var(--dark-gray);
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-menu-link:hover,
    .mobile-menu-link:focus {
        background-color: var(--light-gray);
        color: var(--primary-red);
    }

    .mobile-menu-link i {
        margin-right: var(--space-sm);
    }

    .header-contact {
        display: none;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: 9000;
        /* below header (9999), below menu (10001), above content */
    }

    .mobile-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Adjust hero section for mobile header */
    .hero {
        padding-top: calc(60px + var(--space-3xl));
    }

    /* Make sure main content starts below header */
    main {
        padding-top: 0;
    }


}

/* ===== RESPONSIVE DESIGN - VERY SMALL MOBILE ===== */
@media (max-width: 375px) {
    .container {
        padding: 0 var(--space-xs);
    }

    .nav {
        gap: var(--space-xs);
    }

    .logo {
        font-size: 0.9rem;
        max-width: calc(100% - 45px);
        flex: 1 1 auto;
    }

    .logo img {
        height: 28px;
    }

    .mobile-menu-toggle {
        font-size: 1.25rem;
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
}

/* ===== RESPONSIVE DESIGN - TABLET ===== */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-cta {
        flex-direction: row;
        gap: var(--space-xl);
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-menu-toggle {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }

    .nav-menu {
        display: flex;
    }

    .header-contact {
        display: flex;
    }

    .map-container {
        height: 500px;
    }
}

/* ===== RESPONSIVE DESIGN - DESKTOP ===== */
@media (min-width: 1024px) {

    /* Slightly tighter header on large screens */
    .header {
        height: 55px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }

    .nav {
        padding: var(--space-sm) 0;
        /* reduce vertical padding so content sits higher */
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus indicators for keyboard navigation */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .btn-primary,
    .btn-secondary {
        border: 2px solid var(--dark-gray);
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .header,
    .mobile-menu,
    .btn,
    .cta-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }

    .container {
        max-width: none;
        padding: 0;
    }
}