:root {
    --primary-color: #ef5d12;
    --text-color: #5c5c5c;
    --heading-color: #333333;
    --bg-light: #ffffff;
    --bg-dark: #222222;
    --font-family: 'Open Sans', Arial, sans-serif;
}

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

body {
    font-size: 18px;
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
}

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

a:hover {
    text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--heading-color);
    margin-bottom: 20px;
    font-weight: bold;
}

h1 {
    font-size: 36px;
    color: var(--primary-color);
    text-align: center;
}

h2 {
    font-size: 28px;
    margin-top: 40px;
}

h3 {
    font-size: 22px;
    margin-top: 30px;
}

p {
    margin-bottom: 15px;
}

ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

/* Header */
.site-header {
    background-color: white;
    color: var(--heading-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-content {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 24px;
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--text-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
}

.site-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.site-nav .active a {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: url('/gallery_gen/Letovo-school.png') center/cover no-repeat;
    background-color: #333; /* Fallback */
    color: white;
    text-align: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 20px;
}

.hero-content-top {
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 70%);
    padding: 20px 10px;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
    align-self: center;
}

.hero-content-bottom {
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 70%);
    padding: 20px 10px;
    border-radius: 12px;
    max-width: 900px;
    margin: 0 auto;
    align-self: center;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 0;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-phone a {
    font-size: 24px;
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Intro Section */
.intro-section {
    padding: 60px 0;
    text-align: center;
}

.intro-lead {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 20px;
}

.intro-cta {
    font-size: 20px;
    font-weight: bold;
}

/* Subjects Section */

/* common-bundle.css applies a clearfix (::before / ::after display:table) to all
   .container elements. Inside a CSS Grid those pseudo-elements become real grid items
   and displace the subject cards. Suppress them here. */
.subjects-grid::before,
.subjects-grid::after {
    display: none !important;
    content: none !important;
}

.subjects-section {
    background-color: #f9f9f9;
    padding: 60px 0;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.subject-card {
    background: #92877e;
    color: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    overflow: hidden;
    min-width: 0; /* prevent grid blowout */
}

.subject-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-bottom: 5px solid silver;
}

.subject-math .subject-image {
    background-image: url('/gallery_gen/math-prep.png');
}

.subject-english .subject-image {
    background-image: url('/gallery_gen/english-prep.png');
}

.subject-coding .subject-image {
    background-image: url('/gallery_gen/coding-prep.png');
}

.subject-content {
    padding: 20px;
}

.subject-card h2 {
    font-size: 22px;
    margin-top: 0;
    color: white;
}

/* Content Sections */
.complex-prep-section, .programs-section, .online-learning-section, .tutors-section, .address-section {
    padding: 60px 0;
}

.program-block {
    background: #fdfdfd;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 30px;
}

.features-list li {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ef5d12"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat left 4px;
    background-size: 16px;
    padding-left: 25px;
    list-style: none;
}

.simple-list li {
    list-style-type: disc;
}

/* CTA Block */
.cta-block {
    text-align: center;
    background-color: #fff9f5;
    color: var(--text-color);
    padding: 40px 20px;
    border-radius: 12px;
    margin-top: 40px;
    border: 2px solid var(--primary-color);
}

.cta-block a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cta-text {
    color: var(--heading-color);
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
}

.cta-phone {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
}

.cta-urgency {
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background-color: #92877e;
    color: #ffffff;
    text-align: center;
    padding: 50px 20px;
    margin-top: 60px;
}

.site-footer p {
    margin-bottom: 10px;
    color: #fdfdfd;
}

.site-footer a {
    color: #ffffff;
    font-weight: bold;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #f0f0f0;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Center the lone third card on tablets */
    .subject-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: calc(50% - 15px);
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    h1 {
        font-size: 28px;
    }

    .hero-section {
        min-height: 450px;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }

    /* Reset tablet centering hack for mobile */
    .subject-card:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: 100%;
        margin: 0;
    }
}

/* Desktop styles for hero */
@media (min-width: 769px) {
    .hero-subtitle {
        font-size: 28px;
    }

    .hero-phone a {
        font-size: 36px;
    }

    .hero-content-top, .hero-content-bottom {
        padding: 40px 60px;
    }
}
