/*
 * GRACE Premier Foundations - Consolidated Style Sheet
 *
 * This file contains all the CSS for your website,
 * organized for readability and maintainability.
 *
 * Contents:
 * 1. Base Styles & Global Layout
 * 2. Header & Navigation
 * 3. General Section Styling
 * 4. Index Page Sections (Hero, Services, CTAs, Quote Form)
 * 5. Gallery Page Sections
 * 6. About Page Sections
 * 7. Footer
 * 8. Floating WhatsApp Button
 * 9. Responsive Adjustments (Media Queries)
 */

/* ========================================================================= */
/* 1. Base Styles & Global Layout */
/* ========================================================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #34495e; /* Deeper, modern charcoal grey for main text */
    background-color: #f8f9fa; /* Very light, almost white background */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global container for main content to limit width and center */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* General link styling */
a {
    color: #3498db; /* A vibrant, modern blue for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9; /* Slightly darker blue on hover */
    text-decoration: underline;
}

/* ========================================================================= */
/* 2. Header & Navigation */
/* ========================================================================= */
header {
    background-color: #2c3e50; /* Darker, sophisticated navy blue/charcoal for header */
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Softer, wider shadow for depth */
    /* Removed: position: sticky; top: 0; z-index: 100; for non-sticky header */
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
    letter-spacing: 0.05rem;
    padding-bottom: 0.5rem;
}

header nav {
    margin-top: 0.8rem;
}

header nav a {
    color: #ecf0f1; /* Light greyish-white for nav links */
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    margin: 0 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    display: inline-block;
}

header nav a:hover {
    background-color: #34495e; /* Darker charcoal on hover */
    transform: translateY(-2px); /* Slightly less pronounced lift */
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* Softer shadow on hover */
}

header nav a.active {
    background-color: #3498db; /* Primary blue for active page */
    color: white;
    font-weight: bold;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1); /* Subtle shadow for active state */
}

/* ========================================================================= */
/* 3. General Section Styling */
/* ========================================================================= */
section {
    padding: 4rem 0;
    margin-bottom: 0;
    overflow: hidden;
}

section:nth-of-type(odd) {
    background-color: #ffffff; /* Pure white for odd sections */
}

section:nth-of-type(even) {
    background-color: #f2f4f6; /* Very light, cool grey for even sections */
}

h2, h3 {
    text-align: center;
    margin-bottom: 1.8rem;
    color: #2c3e50; /* Darker, modern heading color */
    line-height: 1.2;
}

h2 {
    font-size: 3rem;
    font-weight: 700;
}

h3 {
    font-size: 2.4rem;
    font-weight: 600;
}

p {
    text-align: center;
    max-width: 900px;
    margin: 0.8rem auto 1.8rem auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #5d6d7e; /* Softer grey for paragraph text */
}

.section-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: #3498db; /* Primary blue for main page titles */
    margin-bottom: 2.5rem;
    padding-top: 1rem;
}

/* ========================================================================= */
/* 4. Index Page Sections */
/* ========================================================================= */

/* Hero Section */
.hero-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #eaf2f8, #d4e6f1); /* Softer, cooler blue gradient */
    box-shadow: inset 0 -3px 10px rgba(0,0,0,0.05); /* Lighter inner shadow */
}

.hero-section h2 {
    font-size: 4rem;
    color: #2980b9; /* Slightly darker primary blue for hero heading */
    margin-bottom: 1.8rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.08); /* More subtle text shadow */
}

.hero-section p {
    font-size: 1.4rem;
    max-width: 900px;
    margin: auto;
    color: #5d6d7e;
}

/* Services Section */
.services-section {
    background-color: #f2f4f6; /* Consistent with even sections */
    padding: 5rem 0;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    flex: 0 0 calc(33.333% - 2rem);
    max-width: 380px;
    padding: 2.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    text-align: left;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card:hover {
    transform: translateY(-8px); /* Slightly less pronounced lift on hover */
    box-shadow: 0 12px 30px rgba(0,0,0,0.15); /* Softer, but still noticeable shadow on hover */
}

.service-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: #3498db; /* Primary blue for service titles */
    font-weight: 600;
}

.service-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: left;
    margin: 0;
    color: #7f8c8d; /* Muted grey for service text */
}

/* Call to Action Sections */
.cta-gallery-section,
.cta-quote-section {
    padding: 3.5rem 0;
    text-align: center;
    background-color: #eaf2f8; /* Light blueish background for CTAs */
}

.cta-gallery-section p a,
.cta-quote-section p a {
    display: inline-block;
    background-color: #3498db; /* Primary blue button */
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(52,152,219,0.2); /* Shadow matching new blue */
}

.cta-gallery-section p a:hover,
.cta-quote-section p a:hover {
    background-color: #2980b9;
    transform: translateY(-2px); /* Softer lift */
    box-shadow: 0 6px 15px rgba(52,152,219,0.3);
}

/* Quote Form Section */
.quote-form-section {
    padding: 5rem 0;
    background-color: #ffffff; /* Consistent white background */
}

.quote-form-section h2 {
    margin-bottom: 2.5rem;
}

.quote-form {
    max-width: 700px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3.5rem;
    border: 1px solid #e0e0e0; /* Lighter border */
    border-radius: 18px;
    background-color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Softer overall shadow */
}

.quote-form input,
.quote-form textarea {
    padding: 1.2rem;
    font-size: 1.15rem;
    border: 1px solid #bdc3c7; /* Muted grey border for inputs */
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.quote-form input:focus,
.quote-form textarea:focus {
    border-color: #3498db; /* Primary blue on focus */
    outline: none;
    box-shadow: 0 0 10px rgba(52,152,219,0.2);
}

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

.quote-form button {
    padding: 1.2rem 2.5rem;
    font-size: 1.3rem;
    background-color: #3498db; /* Primary blue button */
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    align-self: center;
    width: fit-content;
}

.quote-form button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52,152,219,0.3);
}

/* ========================================================================= */
/* 5. Gallery Page Sections */
/* ========================================================================= */
.gallery-page-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.gallery-section {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 3rem 0;
    align-items: center;
}

.project-card {
    perspective: 1200px;
    cursor: pointer;
    width: 100%;
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.card-inner {
    position: relative;
    height: 600px; /* Increased height to allow for taller images */
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 20px;
}

.project-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #34495e; /* Consistent with main text color */
    text-align: center;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(135deg, #ffffff, #f7f9fa); /* Clean white gradient */
    text-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.card-back {
    background: #ecf0f1; /* Light cool grey for card back */
    transform: rotateY(180deg);
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

/* Carousel specific styles (within project cards) */
.carousel {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    position: relative;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Scales content to fill the element's content box, stretching if necessary */
    display: block;
    /* max-width and max-height are not strictly necessary with object-fit: fill, but can remain if desired for other reasons */
    
}

.carousel-caption {
    position: absolute; /* Added: Position absolutely to overlay image */
    bottom: 0; /* Added: Stick to the bottom */
    left: 0; /* Added: Align to the left */
    right: 0; /* Added: Align to the right */
    padding: 1rem;
    font-size: 1.15rem;
    background-color: rgba(0, 0, 0, 0.6); /* Changed: Semi-transparent dark background */
    color: white; /* Changed: White text for readability over dark background */
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    font-weight: 500;
    z-index: 1; /* Ensures caption is above the image */
}
/* ========================================================================= */
/* 6. About Page Sections */
/* ========================================================================= */
.about-page-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.about-section {
    padding: 5rem 0;
    text-align: center;
    background-color: #ffffff;
}

.about-intro {
    font-size: 1.3rem;
    max-width: 900px;
    margin: 1.5rem auto 3.5rem auto;
    line-height: 1.8;
    color: #5d6d7e;
}

.about-intro strong {
    color: #3498db; /* Primary blue for highlights */
    font-weight: 700;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.person-card {
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 2.5rem;
    background-color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    max-width: 400px;
    width: 100%;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.person-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.person-card h3 {
    font-size: 2rem;
    color: #3498db;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.person-card .role {
    font-style: italic;
    color: #7f8c8d; /* Muted grey for roles */
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.person-card .contact-info {
    font-size: 1.2rem;
    color: #34495e;
    margin: 0.8rem 0;
    font-weight: 500;
}

.person-card .contact-info a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: text-decoration 0.3s ease;
}

.person-card .contact-info a:hover {
    text-decoration: underline;
}

.location-card {
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 3rem;
    background-color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    max-width: 700px;
    margin: 3rem auto;
    text-align: center;
}

.location-card h3 {
    font-size: 2rem;
    color: #3498db;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.location-card p {
    font-size: 1.2rem;
    color: #5d6d7e;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: center;
}

.location-card .map-link a {
    display: inline-block;
    background-color: #27ae60; /* Modern green for map button */
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(39,174,96,0.2);
}

.location-card .map-link a:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(39,174,96,0.3);
}

/* ========================================================================= */
/* 7. Footer */
/* ========================================================================= */
footer {
    background-color: #2c3e50; /* Consistent dark background with header */
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 4rem;
    font-size: 0.95rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1); /* Softer shadow at the top */
}

footer p {
    margin: 0.6rem 0;
    color: #bdc3c7; /* Lighter grey for footer text */
}

footer p a {
    color: #85c1e9; /* Lighter blue for footer links */
    text-decoration: none;
    transition: color 0.3s ease;
}
footer p a:hover {
    color: #aed6f1; /* Even lighter on hover */
    text-decoration: underline;
}

/* ========================================================================= */
/* 8. Floating WhatsApp Button */
/* ========================================================================= */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #28a745; /* A more universally accepted green for buttons */
    color: white;
    border-radius: 50%;
    padding: 20px;
    font-size: 32px;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 999; /* Slightly lower z-index than sticky header if we ever bring it back */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
    background-color: #218838; /* Darker green on hover */
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ========================================================================= */
/* 9. Responsive Adjustments (Media Queries) */
/* ========================================================================= */

/* Tablets and larger phones (landscape) */
/* ========================================================================= */
/* 9. Responsive Adjustments (Media Queries) */
/* ========================================================================= */

/* ... (Keep existing 992px media query as is) ... */

/* Smaller phones (portrait) and very small tablets */
@media (max-width: 768px) {
    /* ... (Keep other existing rules for 768px media query as is) ... */

    .project-card {
        max-width: 95%;
    }
    .card-inner {
        height: 400px; /* Adjusted height for 768px. Was 300px. This gives more vertical space. */
    }
    .card-front {
        font-size: 2rem; /* Increased from 1.8rem for better visibility */
    }
    .carousel-track {
        height: calc(100% - 3.5rem); /* Adjust based on new card-inner height for caption */
    }
    .carousel-caption {
        font-size: 1rem;
        padding: 0.8rem;
    }

    /* ... (Keep rest of 768px media query as is) ... */
}

/* Very small phones */
@media (max-width: 480px) {
    /* ... (Keep other existing rules for 480px media query as is) ... */

    .card-inner {
        height: 350px; /* Adjusted height for 480px. Was 250px. More vertical space for images. */
    }
    .card-front {
        font-size: 1.8rem; /* Increased from 1.6rem for better visibility */
    }
    .carousel-track {
        height: calc(100% - 3.5rem); /* Ensure consistent calculation */
    }
    .carousel-caption {
        font-size: 0.95rem; /* Slightly larger for readability */
    }

    /* ... (Keep rest of 480px media query as is) ... */
}

    .about-intro {
        font-size: 1.05rem;
        margin: 1rem auto 2.5rem auto;
    }
    .team-grid {
        gap: 1.5rem;
        margin-top: 2rem;
        flex-direction: column;
        align-items: center;
    }
    .person-card {
        padding: 1.8rem;
        max-width: 90%;
    }
    .person-card h3 {
        font-size: 1.6rem;
    }
    .location-card {
        padding: 1.8rem;
        max-width: 90%;
    }
    .location-card h3 {
        font-size: 1.6rem;
    }
    .location-card p {
        font-size: 1.05rem;
    }
    .location-card .map-link a {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }

    footer {
        padding: 1.8rem 0;
        margin-top: 3rem;
    }

    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        padding: 15px;
        font-size: 24px;
        width: 60px;
        height: 60px;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.7rem;
    }
    header nav a {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }

    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.6rem;
    }
    .section-title {
        font-size: 2.2rem;
    }

    .hero-section h2 {
        font-size: 2.4rem;
    }
    .hero-section p {
        font-size: 1rem;
    }

    .service-card {
        padding: 1.2rem;
    }
    .service-card h4 {
        font-size: 1.3rem;
    }

    .quote-form {
        padding: 1.2rem;
    }
    .quote-form input, .quote-form textarea {
        font-size: 0.9rem;
        padding: 0.7rem;
    }
    .quote-form button {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    .card-inner {
        height: 250px;
    }
    .card-front {
        font-size: 1.6rem;
    }
    .carousel-caption {
        font-size: 0.9rem;
    }

    .person-card, .location-card {
        padding: 1.2rem;
    }
    .person-card h3, .location-card h3 {
        font-size: 1.4rem;
    }
    .person-card .contact-info, .location-card p {
        font-size: 0.95rem;
    }
    .location-card .map-link a {
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
    }

    .whatsapp-btn {
        bottom: 15px;
        right: 15px;
        padding: 12px;
        font-size: 20px;
        width: 50px;
        height: 50px;
    }
}