/* Ace Achievers Academy - Home Tuition Service
   Mobile-First Responsive CSS
*/

/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0b6fa4;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Page Images ===== */
.page-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.content-image {
    width: 100%;
    max-width: 700px;
    height: auto;
    min-height: 300px;
    border-radius: 8px;
    margin: 1.5rem auto 2rem;
    display: block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.image-container {
    text-align: center;
    margin: 2rem 0;
    width: 100%;
}

.image-container img {
    margin: 0 auto;
}

/* Hero Banner Responsive */
@media (max-width: 767px) {
    .hero-banner {
        max-height: 300px;
        object-fit: cover;
        width: 100%;
    }
    
    .content-image {
        min-height: 250px;
        max-width: 100%;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== Typography ===== */
h1 {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ===== Container & Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    padding: 2rem 0;
}

/* ===== Header & Navigation ===== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== Mobile Menu Toggle ===== */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
}

.menu-icon span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* ===== Dropdown Menu ===== */
.nav-menu li {
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin-top: 0.5rem;
    z-index: 1000;
    padding: 0.5rem 0;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ===== Mobile Menu Styles ===== */
@media (max-width: 767px) {
    .menu-toggle {
        display: none;
    }

    .menu-icon {
        display: flex;
        order: 2;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin-top: 1rem;
        gap: 0;
        background-color: var(--white);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 6px;
        padding: 1rem 0;
        order: 3;
        max-height: none;
        min-height: auto;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        list-style: none;
        position: relative;
        z-index: 1000;
    }

    #menu-toggle:checked ~ .nav-menu {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        min-height: auto !important;
    }

    #menu-toggle:checked ~ .menu-icon span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    #menu-toggle:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle:checked ~ .menu-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-menu li {
        width: 100%;
        max-width: 100%;
        border-bottom: 1px solid var(--border-color);
        overflow-x: hidden;
        flex-shrink: 0;
        min-height: 48px;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-content li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Mobile Dropdown - Always show when menu is open for better UX */
    #menu-toggle:checked ~ .nav-menu .dropdown-content {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
        margin-left: 0;
        margin-bottom: 0;
        padding: 0;
        background-color: var(--bg-light);
        border-left: 3px solid var(--primary-color);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        list-style: none;
        overflow-x: hidden;
        height: auto;
        min-height: auto;
    }

    .dropdown-content {
        list-style: none;
    }

    .dropdown-content li {
        border-bottom: 1px solid var(--border-color);
        display: block !important;
        visibility: visible !important;
    }

    /* Make dropdown parent link navigate - keep arrow for visual */
    .dropdown > a {
        cursor: pointer;
    }

    .dropdown > a::after {
        content: " ▼";
        font-size: 0.75rem;
    }

    .dropdown-content a {
        padding-left: 2.5rem;
        font-size: 0.95rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .nav-container {
        flex-wrap: wrap;
        position: relative;
        overflow-x: hidden;
        overflow-y: visible;
        max-width: 100%;
        width: 100%;
    }

    .logo {
        flex: 1;
        order: 1;
    }

    /* Ensure menu doesn't get cut off */
    header {
        overflow-x: hidden;
        overflow-y: visible;
        position: relative;
    }

    nav {
        overflow-x: hidden;
        overflow-y: visible;
        padding-bottom: 0;
        width: 100%;
    }

    /* Make sure all menu items are visible */
    .nav-menu > li {
        min-height: auto;
        display: block !important;
        flex-shrink: 0;
        position: relative;
    }

    /* Ensure Contact and all links are visible */
    .nav-menu > li > a,
    .nav-menu .dropdown > a {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative;
    }

    /* Ensure all menu items are visible when menu is open */
    #menu-toggle:checked ~ .nav-menu > li {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        min-height: 48px !important;
        position: relative !important;
    }

    /* Ensure About Us (4th item) is visible */
    #menu-toggle:checked ~ .nav-menu > li:nth-of-type(4) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: 4;
    }

    /* Ensure Contact (5th item) is visible */
    #menu-toggle:checked ~ .nav-menu > li:nth-of-type(5) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        order: 5;
    }

    /* Make sure dropdown parent is visible */
    #menu-toggle:checked ~ .nav-menu .dropdown {
        display: block !important;
        visibility: visible !important;
        order: 3;
    }

    /* Ensure dropdown items are visible */
    #menu-toggle:checked ~ .nav-menu .dropdown-content li {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
    }

    /* Force all list items to show */
    #menu-toggle:checked ~ .nav-menu li {
        display: block !important;
    }

    /* Debug: Make sure menu has content height */
    #menu-toggle:checked ~ .nav-menu::after {
        content: '';
        display: none;
    }

    /* Ensure menu can expand fully */
    #menu-toggle:checked ~ .nav-menu {
        flex: 0 0 auto;
    }

    /* Make absolutely sure all items render */
    #menu-toggle:checked ~ .nav-menu * {
        box-sizing: border-box;
    }

    /* Ensure no items are hidden - use universal selector */
    #menu-toggle:checked ~ .nav-menu > li {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Force render all children */
    #menu-toggle:checked ~ .nav-menu li,
    #menu-toggle:checked ~ .nav-menu li a {
        display: block !important;
        visibility: visible !important;
    }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ===== Content Sections ===== */
.intro-section {
    background-color: var(--bg-light);
    padding: 3rem 0;
}

.intro-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.intro-section p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.services-section {
    padding: 3rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    color: var(--primary-color);
}

.why-choose-section {
    background-color: var(--bg-light);
    padding: 3rem 0;
}

.why-choose-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.why-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.why-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.areas-section {
    padding: 3rem 0;
}

.areas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.area-tag {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

/* ===== Footer ===== */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--accent-color);
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: var(--white);
}

/* ===== Content Pages Styles ===== */
.content-section {
    padding: 2rem 0;
}

.content-section h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.content-section h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.benefits-list {
    margin: 1.5rem 0;
}

.benefits-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

/* ===== Contact Form ===== */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Tablet & Desktop Styles ===== */
@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-container {
        flex-wrap: nowrap;
    }

    .nav-menu {
        margin-top: 0;
    }

    .dropdown-content {
        min-width: 220px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-column {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    section {
        padding: 3rem 0;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-choose-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== HERO MERGED SECTION ===== */

.hero-merged {
  background: #f7f9fc;
  padding: 60px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-left h1 {
  color: #0b6fa4;
  font-size: 36px;
}

.hero-sub {
  font-size: 18px;
  margin: 10px 0 25px;
}

.steps {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.step {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px;
  text-align: center;
  flex: 1;
  position: relative;
}

.step span {
  display: inline-block;
  margin-top: 8px;
  background: #0b6fa4;
  color: #fff;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
}

.hero-illustration {
  max-width: 100%;
  border-radius: 10px;
}

/* FORM */
.hero-form {
  border: 2px solid #0b6fa4;
  border-radius: 8px;
  background: #fff;
}

.form-header {
  background: #0b6fa4;
  color: #fff;
  padding: 15px;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
}

.form-header span {
  background: #094b6e;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

.hero-form form {
  padding: 20px;
}

.hero-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.hero-form button {
  width: 100%;
  background: #ff7a00;
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
  }
}

/* --- Why Choose Section Layout --- */
.why-choose-section {
    padding: 60px 0;
    background-color: #f8fbff; /* Very light blue bg */
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #01202B;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Grid System */
.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Responsive columns */
    gap: 30px;
    padding: 0 15px;
}

/* --- Card Styling --- */
.why-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px; /* Smooth rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Soft Shadow */
    border: 1px solid #edf2f7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Left Align content */
}

/* Card Hover Effect */
.why-item:hover {
    transform: translateY(-5px); /* Lift up slightly */
    box-shadow: 0 15px 35px rgba(0, 86, 179, 0.15); /* Blue glow shadow */
    border-color: #b3d7ff;
}

/* --- Icon UI Fix (Attractive Circle) --- */
.icon-box {
    width: 60px;
    height: 60px;
    background-color: #e6f0ff; /* Light Blue Background */
    border-radius: 50%; /* Make it circle */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.icon-box i {
    font-size: 24px;
    color: #007bff; /* Primary Blue Icon Color */
}

/* Icon Hover Animation */
.why-item:hover .icon-box {
    background-color: #007bff; /* Circle becomes Dark Blue */
    transform: scale(1.1); /* Slightly enlarge icon */
}

.why-item:hover .icon-box i {
    color: #ffffff; /* Icon becomes White */
}

/* --- Content Typography --- */
.why-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #01202B;
    margin-bottom: 10px;
}

.why-content p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* --- Mobile Fix --- */
@media (max-width: 768px) {
    .why-choose-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    .why-item {
        align-items: center; /* Center align on mobile for better look */
        text-align: center;
    }
}