#navbar {
    background: var(--green-dark);
}

#navbar .logo img {
    height: 75px;
    transition: height 0.3s ease;
    margin: 0.2rem 0 0.2rem 1.5rem;
}

#navbar .desktop-nav a:not(.apply-btn) {
    transition: font-size 0.3s ease;
}

/* Hero Section - Gallery Hero Style */
.stepping-hero {
    position: relative;
    height: 70vh;
    height: -webkit-fill-available;
    min-height: 500px;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 10vh;
}

.stepping-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.stepping-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stepping-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.stepping-hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 0 2rem;
}

.stepping-hero-content h1 {
    font-family: var(--font-head);
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stepping-hero-content p {
    font-family: var(--font-body);
    font-size: 1.2rem;
}

/* Writeup Section */
.stepping-writeup-section {
    padding: 5rem 2rem;
    background: var(--white);
}

.stepping-writeup-container {
    max-width: 60vw;
    margin: 0 auto;
}

.stepping-writeup-content p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
}

.stepping-writeup-content strong {
    color: var(--green);
    font-weight: 600;
}

/* Buttons */
.stepping-buttons {
    display: -webkit-flex;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stepping-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 40px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

.stepping-btn-primary {
    background: var(--yellow);
    color: var(--dark);
}

.stepping-btn-primary:hover {
    background: var(--green);
    color: var(--white);
    transform: translateX(5px);
    -webkit-transform: translateX(5px);
}

.stepping-btn-secondary {
    background: var(--off-white);
    color: var(--green-dark);
}

.stepping-btn-secondary:hover {
    background: var(--green-dark);
    color: var(--white);
    transform: translateX(5px);
    -webkit-transform: translateX(5px);
}

/* Mobile */
@media (max-width: 768px) {
    .stepping-writeup-container{
        max-width: none;
    }

    .stepping-hero {
        height: 50vh;
        min-height: 350px;
    }
    
    .stepping-hero-content h1 {
        font-size: 2rem;
    }
    
    .stepping-hero-content p {
        font-size: 1rem;
    }
    
    .stepping-writeup-section {
        padding: 3rem 1.5rem;
    }
    
    .stepping-writeup-content p {
        font-size: 0.9rem;
    }
    
    .stepping-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stepping-btn {
        width: 100%;
        text-align: center;
    }
}

/* Programs by Age Section */
.programs-age-section {
    background: var(--off-white);
    padding: 5rem 2rem;
    overflow-x: hidden;
}

.programs-age-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Header */
.programs-age-header {
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.header-line {
    height: 1px;
    width: 200px;
    background: var(--green);
}

.programs-age-title {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    margin: 0;
    white-space: nowrap;
}

.programs-age-subtitle {
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--green);
    font-weight: bold;
    margin-bottom: 3rem;
}

/* Cards */
.programs-age-cards {
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.program-age-card {
    display: -webkit-grid;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    background: var(--white);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    /* Safari fix for border-radius + overflow */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.program-age-card:hover {
    transform: translateY(-5px);
    -webkit-transform: translateY(-5px);
}

/* Card Left Side */
.card-left {
    padding: 2rem 2rem 2rem 2.5rem;
}

.card-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.card-age {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid;
}

/* Card accent colors */
.program-age-card[data-accent="green"] .card-age {
    border-bottom-color: #81c784;
}
.program-age-card[data-accent="green"] .card-section h4 {
    color: #2e7d32;
}

.program-age-card[data-accent="yellow"] .card-age {
    border-bottom-color: #fff176;
}
.program-age-card[data-accent="yellow"] .card-section h4 {
    color: #f9a825;
}

.program-age-card[data-accent="red"] .card-age {
    border-bottom-color: #ef9a9a;
}
.program-age-card[data-accent="red"] .card-section h4 {
    color: #c62828;
}

.card-section {
    margin-bottom: 3rem;
}

.card-section h4 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-section ul {
    margin: 0;
    padding-left: 1.25rem;
}

.card-section li {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.card-section p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.card-apply-btn {
    display: inline-block;
    background: var(--yellow);
    color: var(--dark);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 40px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

.card-apply-btn:hover {
    background: var(--green);
    color: var(--white);
    transform: translateX(5px);
    -webkit-transform: translateX(5px);
}

/* Card Right Side - Polaroid Images */
.card-right {
    padding: 2rem 2rem 2rem 0;
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.polaroid {
    background: white;
    padding: 0.75rem 0.75rem 1rem 0.75rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: transform 0.3s ease;
    height: 50%;
    /* Safari fix */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.polaroid:hover {
    transform: scale(1.02);
    -webkit-transform: scale(1.02);
}

.polaroid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .programs-age-section {
        padding: 3rem 1.5rem;
    }
    
    .programs-age-header {
        gap: 1rem;
    }
    
    .header-line {
        width: 40px;
    }
    
    .programs-age-title {
        font-size: 1.3rem;
        white-space: normal;
    }
    
    .programs-age-subtitle {
        font-size: 0.8rem;
        margin-bottom: 2rem;
    }
    
    .program-age-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .card-left {
        padding: 1.5rem;
        order: 2;
    }
    
    .card-right {
        padding: 1.5rem 1.5rem 0 1.5rem;
        order: 1;
        flex-direction: row;
        gap: 1rem;
    }
    
    .polaroid {
        flex: 1;
        padding: 0.5rem 0.5rem 0.75rem 0.5rem;
        height: 150px;
    }
    
    .polaroid img {
        height: 100%;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .card-section h4 {
        font-size: 1rem;
    }
    
    .card-section li,
    .card-section p {
        font-size: 0.85rem;
    }
    
    .card-apply-btn {
        width: 100%;
        text-align: center;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .program-age-card {
        grid-template-columns: 1fr 280px;
        gap: 1rem;
    }
    
    .card-left {
        padding: 1.5rem;
    }
    
    .card-right {
        padding: 1.5rem 1.5rem 1.5rem 0;
        gap: 1rem;
    }
    
    .polaroid img {
        height: 100%;
    }
    
    .card-title {
        font-size: 1.6rem;
    }
}

/* Enrichment Activities Section */
.enrichment-section {
    padding: 5rem 2rem;
    background: var(--off-white);
    overflow-x: hidden;
}

.enrichment-container {
    max-width: 1200px;
    margin: 0 auto;
}

.enrichment-header {
    text-align: center;
    margin-bottom: 3rem;
}

.enrichment-title {
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.enrichment-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--green);
    font-weight: bold;
}

.enrichment-grid {
    display: -webkit-grid;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.enrichment-card {
    background: #faf9f8;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Safari fix */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.enrichment-card:hover {
    transform: translateY(-5px);
    -webkit-transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.enrichment-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.enrichment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.enrichment-card:hover .enrichment-image img {
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
}

.enrichment-content {
    padding: 1.5rem;
}

.enrichment-content h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 0.75rem;
}

.enrichment-content p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ash);
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .enrichment-section {
        padding: 3rem 1.5rem;
    }
    
    .enrichment-title {
        font-size: 2rem;
    }
    
    .enrichment-subtitle {
        font-size: 0.9rem;
    }
    
    .enrichment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .enrichment-image {
        height: 250px;
    }
    
    .enrichment-content {
        padding: 1.25rem;
    }
    
    .enrichment-content h3 {
        font-size: 1.5rem;
    }
    
    .enrichment-content p {
        font-size: 0.9rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .enrichment-section {
        padding: 4rem 2rem;
    }
    
    .enrichment-title {
        font-size: 2rem;
    }
    
    .enrichment-grid {
        gap: 1.5rem;
    }
    
    .enrichment-image {
        height: 270px;
    }
    
    .enrichment-content h3 {
        font-size: 1.5rem;
    }
}

/* After-School Club Section */
.afterschool-section {
    padding: 5rem 2rem;
    background: #FFEBEE;
    overflow-x: hidden;
}

.afterschool-container {
    max-width: 1200px;
    margin: 0 auto;
}

.afterschool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.afterschool-title {
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.afterschool-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--green);
    font-weight: bold;
}

.afterschool-grid {
    display: -webkit-grid;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.afterschool-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    /* Safari fix */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.afterschool-card:hover {
    transform: translateY(-5px);
    -webkit-transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.afterschool-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.afterschool-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.afterschool-card:hover .afterschool-image img {
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
}

.afterschool-content {
    padding: 1.5rem;
    position: relative;
}

.afterschool-badge {
    display: inline-block;
    background: #FFEBEE;
    color: var(--dark);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.afterschool-content h3 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.afterschool-content p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .afterschool-section {
        padding: 3rem 1.5rem;
    }
    
    .afterschool-title {
        font-size: 2rem;
    }
    
    .afterschool-subtitle {
        font-size: 0.8rem;
    }
    
    .afterschool-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .afterschool-image {
        height: 250px;
    }
    
    .afterschool-content {
        padding: 1.25rem;
    }
    
    .afterschool-content h3 {
        font-size: 1.2rem;
    }
    
    .afterschool-content p {
        font-size: 0.85rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .afterschool-section {
        padding: 4rem 2rem;
    }
    
    .afterschool-title {
        font-size: 2rem;
    }
    
    .afterschool-grid {
        gap: 1.5rem;
    }
    
    .afterschool-image {
        height: 250px;
    }
    
    .afterschool-content h3 {
        font-size: 1.5rem;
    }
}

/* Safari/iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS specific */
    .stepping-hero {
        height: -webkit-fill-available;
    }
    
    /* Fix for sticky/hover issues on iOS */
    .polaroid, .enrichment-card, .afterschool-card, .program-age-card {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Fix for border-radius + overflow hidden on iOS */
    .program-age-card, .enrichment-card, .afterschool-card {
        -webkit-mask-image: -webkit-radial-gradient(white, black);
    }
}