/* Custom Styles for AnnGlish Tutoring Website */

:root {
    --primary-color: #007bff; /* Original Bootstrap primary blue */
    --secondary-color: #6c757d; /* Original Bootstrap secondary grey */
    --accent-color: #ffc107; /* A vibrant yellow for accents */
    --light-bg: #f8f9fa; /* Light background */
    --dark-bg: #343a40; /* Dark background */
    --text-color: #212529; /* Dark text */
    --light-text: #ffffff; /* Light text */
    --dark-section-bg: #212529; /* For dark sections like footer/navbar */
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.125);
}


/* Custom Styles for AnnGlish Tutoring Website */

:root {
    --primary-color: #007bff; /* Original Bootstrap primary blue */
    --secondary-color: #6c757d; /* Original Bootstrap secondary grey */
    --accent-color: #ffc107; /* A vibrant yellow for accents */
    --light-bg: #f8f9fa; /* Light background */
    --dark-bg: #343a40; /* Dark background */
    --text-color: #212529; /* Dark text */
    --light-text: #ffffff; /* Light text */
    --dark-section-bg: #212529; /* For dark sections like footer/navbar */
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.125);
}

/* High Contrast Mode */
body.high-contrast {
    --primary-color: #00FFFF; /* Cyan for primary interactive elements */
    --secondary-color: #AAAAAA; /* Light grey for secondary elements */
    --accent-color: #FF00FF; /* Magenta for highlights */
    --light-bg: #000000; /* Black background */
    --dark-bg: #000000; /* Black background */
    --text-color: #FFFF00; /* Bright yellow text */
    --light-text: #FFFFFF; /* White text */
    --dark-section-bg: #000000; /* Black for dark sections */
    --card-bg: #333333; /* Dark grey for cards */
    --border-color: #666666; /* Grey border */

    background-color: var(--light-bg); /* Ensure body background changes */
    color: var(--text-color); /* Ensure body text color changes */
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
    color: var(--text-color); /* Headings should also be high-contrast text color */
}

body.high-contrast .navbar-brand {
    color: var(--primary-color) !important;
}

body.high-contrast .navbar-nav .nav-link {
    color: var(--light-text);
}

body.high-contrast .navbar-nav .nav-link:hover,
body.high-contrast .navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

body.high-contrast .hero-section::before {
    background-color: rgba(0, 0, 0, 0.8); /* Darker overlay in high contrast */
}

body.high-contrast .hero-section h1,
body.high-contrast .hero-section .lead {
    color: var(--light-text);
    text-shadow: none; /* Remove text shadow in high contrast */
}

body.high-contrast section h2::after {
    background-color: var(--primary-color);
}

body.high-contrast .card {
    background-color: var(--card-bg);
    color: var(--light-text); /* Ensure card text is light */
    box-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.2); /* Light shadow for contrast */
    border: 1px solid var(--border-color);
}

body.high-contrast .card i {
    color: var(--primary-color);
}

body.high-contrast .card-title {
    color: var(--primary-color); /* Card titles to primary color */
}

body.high-contrast #about img {
    border-color: var(--primary-color);
    box-shadow: 0 0.5rem 1rem rgba(255,255,255,.2);
}

body.high-contrast .form-control {
    background-color: var(--card-bg);
    color: var(--light-text);
    border-color: var(--border-color);
}

body.high-contrast .form-control:focus {
    background-color: var(--card-bg);
    color: var(--light-text);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 255, 255, 0.25); /* Cyan glow on focus */
}

body.high-contrast .google-reviews-link {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
body.high-contrast .google-reviews-link:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

body.high-contrast footer {
    background-color: var(--dark-section-bg) !important;
    color: var(--light-text);
}

body.high-contrast footer a {
    color: var(--light-text);
}
body.high-contrast footer a:hover {
    color: var(--accent-color);
}

/* Ensure Bootstrap utility classes also respect high contrast mode */
body.high-contrast .text-primary {
    color: var(--primary-color) !important;
}
body.high-contrast .bg-primary {
    background-color: var(--primary-color) !important;
}
body.high-contrast .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000000; /* Ensure button text is dark for contrast */
}
body.high-contrast .btn-primary:hover {
    background-color: var(--accent-color); /* Hover to accent color */
    border-color: var(--accent-color);
    color: #000000;
}

body.high-contrast .btn-outline-light {
    border-color: var(--light-text);
    color: var(--light-text);
}
body.high-contrast .btn-outline-light:hover {
    background-color: var(--primary-color);
    color: #000000;
    border-color: var(--primary-color);
}

body.high-contrast .cookie-consent-banner {
    background-color: rgba(0, 0, 0, 0.95);
    color: var(--light-text);
}
body.high-contrast .cookie-consent-banner p {
    color: var(--light-text);
}
body.high-contrast .cookie-consent-banner a {
    color: var(--primary-color);
}
body.high-contrast .cookie-consent-banner .btn-light {
    background-color: var(--light-text);
    color: var(--dark-bg);
    border-color: var(--light-text);
}
body.high-contrast .cookie-consent-banner .btn-outline-light {
    border-color: var(--light-text);
    color: var(--light-text);
}


body.high-contrast .cookie-consent-banner .btn-outline-light {
    border-color: var(--light-text);
    color: var(--light-text);
}

body.high-contrast .bg-light {
    background-color: var(--dark-bg) !important;
}


body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-bg);
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    background-color: var(--dark-section-bg) !important; /* Dark navbar */
}
.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important; /* Keep brand color consistent */
    font-size: 1.5rem;
}
.navbar-nav .nav-link {
    color: var(--light-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease-in-out;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero-section {
    background: url('../images/hero-background.jpg') no-repeat center center/cover;
    background-attachment: fixed; /* Parallax effect */
    color: var(--light-text);
    padding: 150px 0;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Text shadow for readability */
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay */
    z-index: 1;
}
.hero-section .container {
    position: relative;
    z-index: 2;
}
.hero-section h1 {
    font-size: 3.5rem;
    color: var(--light-text);
}
.hero-section .lead {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}
.hero-section .btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
}


/* General Section Styling */
section {
    padding: 80px 0;
    position: relative;
}
section:nth-of-type(even) {
    background-color: var(--light-bg);
}
section h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}
section h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    border-radius: 2px;
}

/* Cards (Services, etc.) */
.card {
    border-radius: 0.75rem;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    background-color: var(--card-bg);
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15) !important;
}
.card i {
    color: var(--primary-color);
}
.card-title {
    color: var(--dark-bg);
    font-weight: 600;
    margin-top: 1rem;
}

/* About Section */
#about img {
    border: 5px solid var(--primary-color);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}
#about .lead {
    font-weight: 400;
}

/* Contact Form */
#contactForm .g-recaptcha {
    margin-bottom: 1rem;
}
.map-container {
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    height: 0;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.map-container iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border-radius: 0.75rem;
}

/* Reviews Section */
.review-card {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.review-card .stars {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}
.review-card .author {
    font-weight: 600;
    color: var(--primary-color);
}
.google-reviews-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 3px;
    transition: all 0.3s ease-in-out;
}
.google-reviews-link:hover {
    color: var(--dark-bg);
    border-color: var(--dark-bg);
}


/* Footer */
footer {
    background-color: var(--dark-section-bg) !important;
    padding: 2rem 0;
    color: var(--light-text);
}
footer a {
    text-decoration: none;
    color: var(--light-text);
    transition: color 0.3s ease-in-out;
}
footer a:hover {
    color: var(--accent-color);
}

/* Utility Classes & Responsive Adjustments */
.text-primary {
    color: var(--primary-color) !important;
}
.bg-primary {
    background-color: var(--primary-color) !important;
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #0056b3; /* Darker blue */
    border-color: #0056b3;
}

/* Animations */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-fade-in.is-visible,
.animate-slide-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Animation delays for staggered effects */
.animation-delay-1 { transition-delay: 0.2s; }
.animation-delay-2 { transition-delay: 0.4s; }
.animation-delay-3 { transition-delay: 0.6s; }
.animation-delay-4 { transition-delay: 0.8s; }
.animation-delay-5 { transition-delay: 1.0s; }

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 37, 41, 0.95); /* Dark background with transparency */
    color: var(--light-text);
    padding: 1rem 0;
    z-index: 1050; /* Above navbars and modals */
    display: none; /* Hidden by default, shown by JS */
}
.cookie-consent-banner p {
    margin-bottom: 0;
    color: var(--light-text);
}
.cookie-consent-banner a {
    color: var(--accent-color);
}
.cookie-consent-banner .btn-light {
    background-color: var(--light-text);
    color: var(--dark-bg);
    border-color: var(--light-text);
}
.cookie-consent-banner .btn-outline-light {
    border-color: var(--light-text);
    color: var(--light-text);
}


/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .hero-section {
        padding: 100px 0;
        min-height: 500px;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section .lead {
        font-size: 1.2rem;
    }
    section {
        padding: 60px 0;
    }
    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
        min-height: 400px;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .navbar-brand {
        font-size: 1.2rem;
    }
    .navbar-nav .nav-link {
        text-align: center;
    }
    section {
        padding: 40px 0;
    }
    section h2 {
        font-size: 1.8rem;
    }
    .cookie-consent-banner .container {
        flex-direction: column;
    }
    .cookie-consent-banner p {
        margin-bottom: 1rem;
    }
}