/* 
* Little People Montessori Website Styles
* A modern, responsive design with animations
* Created: April 2025
*/

/* ===== CSS RESET & BASE STYLES ===== */
:root {
    /* Brand Colors */
    --primary-green: rgb(34, 139, 34); /* ForestGreen */
    --secondary-green: rgb(0, 128, 0); /* Green */
    --accent-green: rgb(50, 205, 50); /* LimeGreen */
    --light-green: rgb(144, 238, 144); /* LightGreen */
    --pale-green: rgb(152, 251, 152); /* PaleGreen */
    
    /* Neutral Colors */
    --dark: rgb(14, 14, 14);
    --dark-gray: rgb(41, 40, 40);
    --medium-gray: rgb(102, 102, 102);
    --light-gray: rgb(204, 204, 204);
    --off-white: rgb(240, 240, 240);
    --white: rgb(255, 255, 255);
    
    /* Typography */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-round: 50%;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: var(--primary-green);
    transition: color var(--transition-fast);
}

a:hover, a:focus {
    color: var(--accent-green);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary-green);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--light-green);
    color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: absolute; /* Changed from fixed */
    top: var(--spacing-md); /* Position below top edge */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center horizontally */
    width: 90%; /* Make it narrower than full width */
    max-width: 1100px; /* Set a max width */
    z-index: 1000;
    background-color: var(--white);
    box-shadow: var(--shadow-md); /* Slightly stronger shadow */
    transition: all var(--transition-fast);
    border-radius: var(--radius-lg); /* Round all corners */
}

/* Removed .header.scrolled rule as it's no longer sticky */

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

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

.logo {
    width: 80px;
    height: auto;
    transition: all var(--transition-fast);
}

/* Removed .header.scrolled .logo rule */

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--dark-gray);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link:hover, .nav-link:focus {
    color: var(--primary-green);
}

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

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-gray);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative; /* Added for shape divider */
    height: 100vh;
    /* background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://littlepeople.co.za/img/gallery/gallery1.jpg'); */
    background: linear-gradient(-45deg, var(--primary-green), var(--secondary-green), var(--accent-green), var(--pale-green));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    /* background-position: center; */ /* Removed for animation */
    /* background-attachment: fixed; */ /* Removed for animation */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    /* padding-top: 80px; Removed padding as header is no longer fixed */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 1.5s ease-out;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: var(--spacing-md);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-md);
}

/* ===== ABOUT SECTION ===== */
#about {
    position: relative; /* Added for shape divider */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: var(--spacing-sm);
}

.about-text p {
    margin-bottom: var(--spacing-md);
}

.about-image {
    position: relative;
}

.image-frame {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform var(--transition-medium);
}

.image-frame:hover {
    transform: perspective(1000px) rotateY(0);
}

.about-img {
    width: 100%;
    height: auto;
    transition: transform var(--transition-medium);
}

.about-img:hover {
    transform: scale(1.05);
}

/* ===== SERVICES SECTION ===== */
.services {
    position: relative; /* Added for shape divider */
    background-color: var(--light-green);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: var(--spacing-sm);
}

.service-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: var(--spacing-sm);
}

/* ===== GALLERY SECTION ===== */
#gallery {
    position: relative; /* Added for shape divider */
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    height: 250px;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-modal:hover {
    color: var(--light-gray);
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 80%;
    max-height: 80vh;
    animation: zoom 0.6s;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--white);
    padding: 10px 0;
    height: 150px;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    position: relative; /* Added for shape divider */
    background-color: var(--off-white);
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-slide {
    width: 100%;
    opacity: 0;
    position: absolute;
    transition: opacity var(--transition-medium);
}

.testimonial-slide.active {
    opacity: 1;
    position: relative;
}

.testimonial-content {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    position: relative;
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    color: var(--light-green);
    font-family: serif;
    opacity: 0.3;
    line-height: 1;
}

.testimonial-text {
    position: relative;
    z-index: 1;
    margin-bottom: var(--spacing-sm);
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: var(--spacing-sm);
}

.author-info h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 5px;
}

.stars {
    color: #FFD700;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-md);
}

.prev-btn, .next-btn {
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--secondary-green);
}

.testimonial-dots {
    display: flex;
    gap: 8px;
    margin: 0 var(--spacing-sm);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-round);
    background-color: var(--light-gray);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.dot.active {
    background-color: var(--primary-green);
}

/* ===== CONTACT SECTION ===== */
#contact {
    position: relative; /* Added for shape divider */
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-green);
    width: 40px;
    height: 40px;
    background-color: var(--light-green);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-text h3 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--primary-green);
    margin-bottom: 5px;
}

.contact-map {
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-links a {
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--secondary-green);
    transform: translateY(-5px);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
}

.footer-logo-img {
    width: 100px;
    height: auto;
    margin: 0 auto;
}

.footer-text p {
    margin-bottom: var(--spacing-xs);
}

.footer-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.footer-nav-list a {
    color: var(--white);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.footer-nav-list a:hover {
    opacity: 1;
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--secondary-green);
    transform: translateY(-5px);
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoom {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all var(--transition-medium);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
    html {
        font-size: 14px;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-image {
        order: -1;
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        padding: var(--spacing-lg) var(--spacing-md);
        transform: translateX(100%);
        transition: transform var(--transition-medium);
        box-shadow: var(--shadow-lg);
        z-index: 1001;
    }
    
    .nav-list.active {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: var(--spacing-sm) 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
    }
    
    .section-padding {
        padding: var(--spacing-md) 0;
    }
    
    .gallery-container {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-nav-list {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

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

:focus {
    outline: 3px solid var(--accent-green);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--accent-green);
    outline-offset: 3px;
}


/* ===== Custom Shape Divider ===== */
.custom-shape-divider-bottom-1745951262 {
    position: absolute;
    bottom: 0; /* Changed from top */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg); /* Added to flip the shape */
}

.custom-shape-divider-bottom-1745951262 svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px; /* Adjust height as needed */
}

.custom-shape-divider-bottom-1745951262 .shape-fill {
    fill: var(--white); /* Match the background color of the section below */
}

/* Divider for Services Section Top */
.custom-shape-divider-top-services {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.custom-shape-divider-top-services svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px; /* Adjust height as needed */
}

.custom-shape-divider-top-services .shape-fill {
    fill: var(--white); /* Match the background color of the section above (About) */
}

/* Divider for Contact Section Bottom */
.custom-shape-divider-bottom-contact {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg); /* Flip the shape */
}

.custom-shape-divider-bottom-contact svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px; /* Adjust height as needed */
}

.custom-shape-divider-bottom-contact .shape-fill {
    fill: var(--primary-green); /* Match the background color of the footer */
}
