/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0047AB;
    /* Deep Royal Blue */
    --secondary-blue: #2a75bb;
    /* Slightly Lighter Blue */
    --light-blue: #e6f0ff;
    /* Very Light Blue tint */
    --dark-blue: #002a66;
    /* Darker Navy Blue */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    --text-color: #333333;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --border-radius: 6px;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    position: relative;
    padding-bottom: 0.8rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background-color: var(--secondary-blue);
    border-radius: 2px;
}

h3 {
    font-size: 1.6rem;
    color: var(--dark-blue);
}

p {
    margin-bottom: 1.2rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Prevent underline on auto-detected links (iOS/Android) */
a[href^="tel"],
a[href^="mailto"],
.contact-phone a,
.contact-email a,
.top-info-center a {
    text-decoration: none !important;
    color: inherit !important;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;

}

.section-title-center {
    text-align: center;
}

.section-title-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-donate {
    background-color: #e63946;
    color: var(--white);
    font-weight: 700;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
}

.btn-donate:hover {
    background-color: #c1121f;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.main-navbar .btn-donate {
    justify-self: end;
    /* Align donate button to end */
}

/* Header Styles */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.top-navbar {
    background-color: transparent;
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 1.05rem;
    /* Increased font size */
}

.top-navbar .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.top-info-left {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-info-center {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-self: end;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--secondary-blue);
    transform: translateY(-2px);
}

.divider {
    height: 0.5px;
    background-color: rgba(255, 255, 255, 0.3);
    width: 98%;
    margin: 0 auto;
    /* Centered divider */
}

.main-navbar {
    padding: 1.2rem 0;
    background-color: transparent;
    position: relative;
    z-index: 1000;
}

.main-navbar .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Logo, Links, Button */
    align-items: center;
    justify-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 2rem;
    /* Increased font size */
    color: var(--white);
    justify-self: start;
    /* Align logo to start */
}

.logo-icon {
    background-color: var(--primary-blue);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    justify-self: center;
    /* Center links */
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    color: var(--white);
    font-size: 1.1rem;
    /* Increased font size */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--white);
    /* White for visibility on transparent header */
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    width: 100%;
    height: 100%;
    background-size: cover;
    /* Ensures full coverage */
    background-position: center top;
    /* Focus on top to bottom visibility */
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 30, 80, 0.6);
    /* Darker, less bright overlay */
}

.hero-content {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 10;
    width: 90%;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--white);
    transform: scale(1.2);
}

/* Who We Are Section */
.who-we-are {
    background-color: var(--light-gray);
}

.who-we-are-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.who-we-are-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.who-we-are-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.who-we-are-image:hover img {
    transform: scale(1.03);
}

/* What We Do Section */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.8rem;
}

.card h3 {
    margin-bottom: 0.8rem;
    color: var(--primary-blue);
}

.card-icon {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

/* Impact Section */
.impact {
    background-color: var(--light-blue);
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.stat-item {
    padding: 2rem 1rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-text {
    font-weight: 600;
    color: var(--dark-gray);
}

/* Call to Action Section */
.cta-section {
    text-align: center;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 4rem 0;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.cta-section h2::after {
    background-color: var(--white);
    left: 50%;
    transform: translateX(-50%);
}

.cta-section p {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background-color: var(--white);
    color: var(--primary-blue);
}

.cta-section .btn-primary:hover {
    background-color: var(--light-gray);
}

.cta-section .btn-secondary {
    border-color: var(--white);
    color: var(--white);
}

.cta-section .btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

/* Footer */
footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.7rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-blue);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    transition: var(--transition);
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-blue);
    padding-left: 5px;
}

.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.contact-info i {
    margin-right: 1rem;
    color: var(--secondary-blue);
    margin-top: 0.2rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Styles */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .who-we-are-content {
        gap: 3rem;
    }

    /* Tablet/Mobile Adjustments for Header */
    .main-navbar .container {
        display: flex;
        justify-content: space-between;
    }

    .main-navbar .btn-donate {
        display: none;
        /* Hide donate button in navbar on small screens */
    }

    /* Top navbar mobile adjustments */
    .top-navbar {
        font-size: 0.75rem;
        line-height: 1;
    }

    .top-navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem;
        gap: 0;
    }

    .top-info-left {
        display: none !important;
    }

    .top-info-center {
        text-align: left;
        margin: 0;
        font-size: 0.75rem;
    }

    .social-icons {
        display: flex;
        gap: 1rem;
        margin: 0;
    }

    /* Reduce email font size for mobile to prevent overflow/visual issues */
    .contact-email {
        font-size: 0.85rem;
        word-break: break-all;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        color: var(--white);
        /* White hamburger icon */
        font-size: 1.8rem;
    }

    /* Mobile size reductions */
    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 35px !important;
    }

    .mobile-menu-btn {
        font-size: 1.5rem !important;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        /* Full height */
        background-color: var(--primary-blue);
        /* Blue background */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem 0;
        gap: 2rem;
        transform: translateX(-100%);
        opacity: 0;
        transition: var(--transition);
        z-index: 1500;
    }

    .nav-links a {
        color: var(--white);
        font-size: 1.3rem;
    }

    .nav-links a::after {
        background-color: var(--white);
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .who-we-are-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo img {
        height: 30px !important;
    }

    .mobile-menu-btn {
        font-size: 1.3rem !important;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    section {
        padding: 3.5rem 0;
    }

    .hero {
        height: 75vh;
        min-height: 500px;
    }

    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .hero p {
        font-size: 0.85rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideUp 0.3s;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--dark-gray);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    padding: 5px 10px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.close-modal:hover {
    color: var(--primary-blue);
}

.modal h2 {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.modal-phone {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.modal-phone a {
    display: inline-block;
    margin-top: 5px;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.3rem;
}

.modal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--medium-gray);
}

.modal-divider span {
    padding: 0 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-blue);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--light-blue);
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Mobile Responsiveness */
@media (max-width: 576px) {
    .modal-content {
        margin: 5% auto;
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .modal h2 {
        font-size: 1.5rem;
    }

    .modal-phone {
        font-size: 1rem;
    }

    .modal-phone a {
        font-size: 1.1rem;
    }

    /* Remove underlines from phone and email in contact info */
    .info-item p {
        text-decoration: none !important;
        font-size: 0.9rem !important;
    }

    /* Reduce font size of email name label in mobile view */
    .info-item span {
        font-size: 0.65rem;
    }

    /* Ensure contact info text has no underline */
    .contact-info div {
        text-decoration: none !important;
    }

    /* Remove underlines from footer contact info */
    .contact-info li div {
        text-decoration: none !important;
    }
}

/* ============================
   Contact Page Specific Styles (Modernized)
   ============================ */
.contact-page-section {
    padding: 6rem 0;
    /* subtle brand gradient instead of black */
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
}

.contact-header {
    margin-bottom: 4rem;
    max-width: 800px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.contact-header h1 {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    color: var(--dark-blue);
    font-weight: 700;
    letter-spacing: -1px;
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    /* make the left/form column wider so the form and hours feel more open */
    grid-template-columns: 1.4fr 0.6fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}

.contact-form-container,
.info-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    /* Soft, deep shadow for floating effect */
    box-shadow: 0 20px 40px rgba(0, 71, 171, 0.08);
    /* slight blue tint */
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.contact-form-container:hover,
.info-card:hover {
    transform: translateY(-5px);
}

.contact-form-container h3,
.info-card h3 {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    border-bottom: none;
    position: relative;
    padding-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-page-section .form-group {
    margin-bottom: 1.8rem;
}

.contact-page-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: var(--dark-blue);
    letter-spacing: 0.5px;
}

/* Modern Filled Inputs */
.contact-page-section input,
.contact-page-section textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid transparent;
    border-radius: 12px;
    background-color: #f4f6f9;
    /* Light gray fill */
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.contact-page-section input:focus,
.contact-page-section textarea:focus {
    outline: none;
    background-color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 71, 171, 0.1);
}

.contact-page-section input::placeholder,
.contact-page-section textarea::placeholder {
    color: #a0aec0;
}

/* Button Modernization */
.contact-form-container .btn-primary {
    background: linear-gradient(135deg, #e63946 0%, #d62839 100%);
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
    width: 100%;
    border: none;
    color: white;
    padding: 1rem;
    cursor: pointer;
    text-transform: uppercase;
}

.contact-form-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(230, 57, 70, 0.4);
}

/* Info Cards Refinement */
.contact-info-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    height: 100%;
}

.info-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-grid,
.hours-grid {
    display: grid;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Icon Modernization: Circle Background */
.info-item i {
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff0f1;
    /* Light red tint */
    color: #e63946;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.info-item:hover i {
    background-color: #e63946;
    color: var(--white);
    transform: rotate(15deg);
}

.info-item span,
.hours-item span {
    font-weight: 700;
    font-size: 0.75rem;
    color: #8898aa;
    display: block;
    margin-bottom: 0.4rem;
    letter-spacing: 0.5px;
}

.info-item p,
.hours-item p {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--dark-blue);
    text-decoration: none !important;
}

.info-item:nth-child(3) p {
    font-size: 0.9rem;
}

/* Prevent automatic telephone/mailto link styling and keep phone numbers on one line */
a[href^="tel"],
a[href^="mailto"] {
    text-decoration: none !important;
    color: inherit !important;
}

.phone-numbers {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    display: inline-block;
}

.hours-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.map-section iframe {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    filter: none;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .hours-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-container,
    .info-card,
    .contact-panel {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.contact-panel {
    padding: 1.4rem;
}

/* Force horizontal layout on wider screens and ensure right column stacks internally */
@media (min-width: 993px) {
    .contact-grid {
        /* give the form substantially more room on desktop */
        grid-template-columns: 1.6fr 0.4fr;
        align-items: start;
    }

    .contact-info-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .contact-form-container {
        min-width: 0;
    }

    /* slightly increase breathing room for the hours card */
    .hours-card {
        padding: 2.2rem;
    }

    /* Ensure both main boxes fully fill their grid column so edges align */
    .contact-form-container,
    .contact-info-container,
    .info-card {
        width: 100%;
    }
}

/* Safety & Alignment Overrides for Contact Form */
/* Keep page background white as requested */
body,
.contact-page-section {
    background-color: var(--white);
}

/* Ensure form fields and labels align consistently */
.contact-form-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.contact-page-section .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.contact-page-section label {
    display: block;
    text-align: left;
    width: 100%;
}

.contact-page-section input,
.contact-page-section textarea {
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

/* Make sure the submit button occupies full width and aligns with inputs */
.contact-form-container .btn,
.contact-form-container .btn-primary {
    width: 100%;
    text-align: center;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Reduce container side padding so boxes can expand to viewport edges */
    .container {
        padding: 0 0.5rem !important;
    }

    /* Reduce vertical padding but open horizontal space */
    .contact-page-section {
        padding: 1.8rem 0 !important;
    }

    /* Force smaller internal padding on contact/info boxes */
    .contact-form-container,
    .info-card,
    .contact-panel {
        padding: 0.8rem !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    /* Slightly larger, more tappable inputs */
    .contact-page-section input,
    .contact-page-section textarea {
        padding: 1rem !important;
        font-size: 1rem !important;
    }

    /* Ensure media never overflow */
    img,
    iframe {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Prevent horizontal scroll */
    .contact-form-container,
    .info-card,
    .contact-panel,
    .contact-grid {
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    /* Button sizing */
    .contact-form-container .btn-primary {
        padding: 0.9rem !important;
        font-size: 0.98rem !important;
    }
}

/* Extra tight layout for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 0.4rem !important;
    }

    .contact-grid {
        gap: 0.6rem !important;
    }

    .contact-form-container,
    .info-card,
    .contact-panel {
        padding: 0.6rem !important;
        border-radius: 8px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .form-row {
        gap: 0.6rem !important;
    }

    .contact-page-section input,
    .contact-page-section textarea {
        padding: 0.8rem !important;
        font-size: 0.95rem !important;
    }

    .contact-form-container .btn-primary {
        padding: 0.8rem !important;
        font-size: 0.95rem !important;
    }

    /* Prevent overflow */
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }
}