/*
Theme Name: Karolina's Academy
Description: Custom theme for Karolina's Academy - English-language kindergarten and daycare in Wrocław
Author: Custom Development
Version: 1.0
Text Domain: karolinas-academy
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .feature-item:hover,
    .staff-member:hover {
        transform: none;
    }
    
    /* Optimize scrolling */
    .site-header {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Improve touch scrolling */
    .main-navigation {
        -webkit-overflow-scrolling: touch;
    }
}

body {
    font-family: 'Gilroy', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-weight: 300;
}

/* Ensure Gilroy is used throughout the site */
* {
    font-family: 'Gilroy', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: #2c3e50;
}

h2 {
    font-size: 2rem;
    color: #34495e;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    p {
        font-size: 1.1rem;
        line-height: 1.7;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        line-height: 1.4;
    }
    
    .hero-description {
        font-size: 1.2rem;
        line-height: 1.6;
    }
    
    .content-text {
        font-size: 1.15rem;
        line-height: 1.8;
    }
    
    .staff-name {
        font-size: 1.4rem;
    }
    
    .staff-description {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    p {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    
    .hero-content h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .hero-description {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .content-text {
        font-size: 1.1rem;
        line-height: 1.8;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
    text-decoration: none;
}

/* Navigation */
.main-navigation {
    display: flex;
    list-style: none;
}

.main-navigation li {
    margin-left: 2rem;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: #3498db;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.info-icon img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.support-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.support-icon img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

/* Content Sections */
.content-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Staff Section */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.staff-member {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.staff-member:hover {
    transform: translateY(-5px);
}

.staff-photo {
    width: 100%;
    height: 250px;
    object-fit: cover;
    max-width: 100%;
    height: auto;
}

/* Image optimization for mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive images */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {
    .staff-photo {
        height: 200px;
    }
    
    .hero-section {
        background-attachment: scroll; /* Better performance on mobile */
    }
    
    /* Optimize feature icons for mobile */
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-icon img {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (max-width: 480px) {
    .staff-photo {
        height: 180px;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .feature-icon img {
        width: 2rem;
        height: 2rem;
    }
}

.staff-info {
    padding: 1.5rem;
}

.staff-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.staff-position {
    color: #3498db;
    font-weight: 300;
    margin-bottom: 1rem;
}

.staff-description {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #3498db 0%, #34495e 100%);
    color: white;
    padding: 100px 0;
}

.contact-info-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
}

.contact-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1200px;
    width: 100%;
    align-items: stretch;
}

.contact-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

.contact-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: rgba(52, 152, 219, 0.5);
}

.contact-icon-wrapper {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 152, 219, 0.2);
    border-radius: 12px;
    border: 2px solid rgba(52, 152, 219, 0.4);
}

.contact-icon {
    font-size: 1.8rem;
    display: block;
}

.contact-icon.social-icon {
    width: 28px;
    height: 28px;
    fill: white;
    display: block;
}

.social-icons-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon-link:hover {
    transform: translateY(-3px) scale(1.1);
}

.social-icon-link .social-icon {
    width: 2.8125rem;
    height: 2.8125rem;
    fill: white;
    transition: all 0.3s ease;
}

.social-icon-link:hover .social-icon {
    fill: white;
    opacity: 0.8;
}

.contact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-content p {
    margin: 0;
    color: white;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 800;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-weight: 800;
    display: inline-block;
}

.contact-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    transform: translateX(3px);
}

.contact-map-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 100%;
    display: flex;
    align-items: stretch;
}

.contact-map-wrapper:hover {
    border-color: rgba(52, 152, 219, 0.5);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.contact-map-wrapper iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 500px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .contact-section {
        overflow-x: hidden;
    }
    
    .contact-section .section-title {
        font-size: 2.25rem !important;
        padding: 0 10px;
        word-wrap: break-word;
    }
    
    .contact-info-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .contact-grid-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-info {
        padding: 40px 30px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    
    .contact-title {
        font-size: 1.75rem;
    }
    
    .contact-item {
        padding: 1rem;
        gap: 1rem;
        box-sizing: border-box;
    }
    
    .contact-icon-wrapper {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }
    
    .contact-icon {
        font-size: 1.5rem;
    }
    
    .contact-icon.social-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .social-icon-link .social-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .contact-content {
        min-width: 0;
        overflow-wrap: break-word;
    }
    
    .contact-content p,
    .contact-link {
        font-size: 1rem;
    }
    
    .contact-map-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-map-wrapper iframe {
        min-height: 300px;
        width: 100%;
        max-width: 100%;
    }
}

/* Footer */
.site-footer {
    background: #34495e;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Forms */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 300;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    background: #3498db;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 300;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-navigation li {
        margin: 0.5rem;
    }
    
    .main-navigation a {
        padding: 12px 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-grid {
        grid-template-columns: 1fr;
    }
    
    /* Improve button touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* Improve form input touch targets */
    .form-group input,
    .form-group textarea {
        min-height: 44px;
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Improve link touch targets */
    .contact-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 8px 12px;
    }
    
    /* Language switcher touch targets */
    .lang-link {
        min-height: 44px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Menu toggle button improvements */
    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    
    /* Social media links touch targets */
    .social-icon-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Scroll to top button mobile optimization */
    .scroll-to-top {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
    }
    
    /* Feature item touch improvements */
    .feature-item {
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .feature-item:active {
        transform: scale(0.98);
    }
    
    /* Staff member touch improvements */
    .staff-member {
        cursor: pointer;
    }
    
    .staff-member:active {
        transform: scale(0.98);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .content-section {
        padding: 60px 0;
    }
    
    .features-section {
        padding: 60px 0;
    }
    
    /* Additional mobile fixes */
    .features-grid {
        gap: 1.5rem;
    }
    
    .feature-item {
        padding: 1.5rem;
    }
    
    .staff-grid {
        gap: 1.5rem;
    }
    
    .staff-info {
        padding: 1.25rem;
    }
    
    /* Ensure no horizontal scroll */
    .two-column {
        gap: 2rem;
    }
    
    .contact-section {
        padding: 60px 0;
        overflow-x: hidden;
    }
    
    .contact-section .section-title {
        font-size: 2rem !important;
        margin-bottom: 2rem;
        padding: 0 10px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .contact-info-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .contact-grid-layout {
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-info {
        padding: 25px 15px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .contact-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-item {
        padding: 0.875rem;
        gap: 0.875rem;
        box-sizing: border-box;
    }
    
    .contact-icon-wrapper {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .contact-icon {
        font-size: 1.2rem;
    }
    
    .contact-content {
        min-width: 0;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .contact-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .contact-link {
        font-size: 0.95rem;
        word-break: break-word;
    }
    
    .contact-map-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-map-wrapper iframe {
        min-height: 250px;
        width: 100%;
        max-width: 100%;
    }
}

/* Extra small devices (phones, 375px and down) */
@media (max-width: 375px) {
    .container {
        padding: 0 12px;
    }
    
    .contact-section {
        padding: 50px 0;
    }
    
    .contact-section .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 1.5rem;
        padding: 0 8px;
    }
    
    .contact-info {
        padding: 20px 12px;
    }
    
    .contact-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }
    
    .contact-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .contact-icon-wrapper {
        width: 36px;
        height: 36px;
    }
    
    .contact-icon {
        font-size: 1.1rem;
    }
    
    .contact-content p,
    .contact-link {
        font-size: 0.9rem;
    }
    
    .contact-items {
        gap: 1rem;
    }
    
    .social-icons-wrapper {
        gap: 1rem;
    }
    
    .social-icon-link .social-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* Hero Section Responsive Styles */
@media (max-width: 768px) {
    .hero-section {
        height: 400px !important;
        padding: 20px 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
        padding: 0 1rem;
    }
    
    .hero-section .hero-subtitle {
        font-size: 1.2em !important;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 350px !important;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
        margin-bottom: 15px !important;
    }
    
    .hero-section .hero-subtitle {
        font-size: 1.1em !important;
        margin-bottom: 15px !important;
    }
}