/* ========================================
   Station 5 — Charlotte County Fire & EMS
   Custom Styles
======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #152a47;
}
::-webkit-scrollbar-thumb {
    background: #c95e3e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b8492b;
}

/* ---------- Navbar ---------- */
.navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.scrolled {
    background: rgba(13, 29, 48, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #c95e3e;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 60%;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
}

.mobile-menu.open {
    display: block;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: #0d1d30;
}

.hero-bg {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(13, 29, 48, 0.88) 0%,
        rgba(21, 42, 71, 0.78) 50%,
        rgba(13, 29, 48, 0.85) 100%
    );
}

.hero-gradient {
    pointer-events: none;
}

.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.hero-title {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.5s;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.7s;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.9s;
}

.hero-stats {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 1.1s;
}

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

.hero-scroll {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 1.3s;
}

.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #c95e3e;
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: #b8492b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 94, 62, 0.4);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* ---------- Section Layout ---------- */
.section {
    position: relative;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #c95e3e;
    margin-bottom: 12px;
    position: relative;
    padding-left: 32px;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 2px;
    background: #c95e3e;
}

.section-label-light {
    color: #eda882;
}

.section-label-light::before {
    background: #eda882;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    color: #152a47;
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.0625rem;
    color: #64748b;
    line-height: 1.7;
    max-width: 560px;
}

.section-desc-light {
    color: rgba(255, 255, 255, 0.6);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Services Grid ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #f1f5f9;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c95e3e, #eda882);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(21, 42, 71, 0.1);
    border-color: transparent;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #fef2ee, #fde8e0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c95e3e;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: #c95e3e;
    color: #fff;
    transform: scale(1.05);
}

.service-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #152a47;
    margin-bottom: 10px;
    line-height: 1.3;
}

.service-desc {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.7;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-img {
    width: 100%;
    height: 560px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(21, 42, 71, 0.15);
}

.about-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #c95e3e, #eda882);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
}

.about-floating-card {
    position: absolute;
    bottom: 32px;
    left: -32px;
    background: #fff;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 20px 50px rgba(21, 42, 71, 0.15);
    z-index: 2;
}

.about-text {
    font-size: 1rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-value {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.about-value-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, #fef2ee, #fde8e0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c95e3e;
}

.about-value-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #152a47;
    margin-bottom: 4px;
}

.about-value-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}

/* ---------- Community ---------- */
.community-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.community-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.community-card:hover {
    transform: translateY(-4px);
    border-color: rgba(237, 168, 130, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.community-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.community-card-img-inner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.community-card:hover .community-card-img-inner {
    transform: scale(1.08);
}

.community-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 29, 48, 0.8) 0%, transparent 60%);
}

.community-card-content {
    padding: 24px;
}

.community-card-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #eda882;
    background: rgba(237, 168, 130, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.community-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.community-card-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #c95e3e, #eda882, #c95e3e);
}

.timeline-item {
    position: relative;
    padding-left: 64px;
    padding-bottom: 48px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 14px;
    top: 4px;
    width: 22px;
    height: 22px;
    background: #c95e3e;
    border-radius: 50%;
    border: 4px solid #f5f0e8;
    box-shadow: 0 0 0 2px #c95e3e;
}

.timeline-year {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c95e3e;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #152a47;
    margin-bottom: 8px;
}

.timeline-desc {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.7;
}

/* ---------- CTA Section ---------- */
.cta-title {
    font-family: 'Playfair Display', serif;
}

.cta-desc {
    font-family: 'Manrope', sans-serif;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #c95e3e;
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 32px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-cta-primary:hover {
    background: #fef2ee;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 16px 32px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.7;
}

.contact-detail {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-detail-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, #fef2ee, #fde8e0);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c95e3e;
}

.contact-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
}

.contact-detail-value {
    font-size: 0.9375rem;
    color: #152a47;
    line-height: 1.6;
}

/* Contact Form */
.contact-form-wrapper {
    position: relative;
}

.contact-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(21, 42, 71, 0.08);
    border: 1px solid #f1f5f9;
}

.contact-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #152a47;
    margin-bottom: 8px;
}

.contact-form-desc {
    font-size: 0.9375rem;
    color: #64748b;
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-family: 'Manrope', sans-serif;
    color: #152a47;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #c95e3e;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(201, 94, 62, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline x1='6' y1='9' x2='12' y2='15' x3='18' y2='9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

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

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #c95e3e;
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 14px 32px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.btn-submit:hover {
    background: #b8492b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 94, 62, 0.35);
}

.btn-submit-arrow {
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-submit-arrow {
    transform: translate(4px, -4px);
}

/* Success State */
.form-success {
    text-align: center;
    padding: 40px 20px;
}

.form-success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #fef2ee, #fde8e0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #c95e3e;
}

.form-success-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #152a47;
    margin-bottom: 8px;
}

.form-success-desc {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* ---------- Map ---------- */
.map-wrapper {
    box-shadow: 0 20px 50px rgba(21, 42, 71, 0.12);
}

/* ---------- Footer ---------- */
.footer {
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}

.footer-desc {
    max-width: 300px;
}

.footer-heading {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    font-size: 0.875rem;
    color: #94a3b8;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-link:hover {
    color: #eda882;
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: #c95e3e;
    color: #fff;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(201, 94, 62, 0.35);
}

.back-to-top:hover {
    background: #b8492b;
    transform: translateY(-3px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        gap: 48px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .section {
        padding-top: 80px;
        padding-bottom: 80px;
    }

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-img {
        height: 400px;
    }

    .about-floating-card {
        left: 16px;
        bottom: 16px;
    }

    .about-image-accent {
        display: none;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        padding: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .hero-stats {
        gap: 24px;
    }

    .cta-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .timeline::before {
        left: 16px;
    }

    .timeline-item {
        padding-left: 48px;
    }

    .timeline-marker {
        left: 6px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hero-ctas {
        flex-direction: column;
    }

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

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
