/* Tennis Club Styles - CodeIgniter 4 Version */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    padding: 1rem 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(44, 85, 48, 0.95);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo i {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section with Slideshow */
.hero {
    height: 80vh;
    min-height: 600px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    /* Vylepšení ostrosti obrázku */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Hero slideshow backgrounds */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-1 {
    background-image: linear-gradient(45deg, rgba(240, 250, 241, 0.0), rgba(74, 124, 89, 0.1)), 
                      url('../images/areaal_1.jpg');
}

.hero-slide-2 {
    background-image: linear-gradient(45deg, rgba(240, 250, 241, 0.0), rgba(74, 124, 89, 0.1)), 
                      url('../images/areaal_2.jpg');
}

.hero-slide-3 {
    background-image: linear-gradient(45deg, rgba(240, 250, 241, 0.0), rgba(74, 124, 89, 0.1)), 
                      url('../images/areaal_3.jpg');
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Fallback background pattern */
.hero.no-image {
    background: linear-gradient(45deg, rgba(44, 85, 48, 0.8), rgba(74, 124, 89, 0.7)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><pattern id="tennis-court" patternUnits="userSpaceOnUse" width="100" height="60"><rect width="100" height="60" fill="%234a7c59"/><rect x="10" y="10" width="80" height="40" fill="none" stroke="%23ffffff" stroke-width="2"/><line x1="50" y1="10" x2="50" y2="50" stroke="%23ffffff" stroke-width="1"/><circle cx="25" cy="30" r="15" fill="none" stroke="%23FFD700" stroke-width="2"/><circle cx="75" cy="30" r="15" fill="none" stroke="%23FFD700" stroke-width="2"/></pattern></defs><rect width="1200" height="800" fill="url(%23tennis-court)" opacity="0.3"/></svg>');
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
    background: rgba(44, 85, 48, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Floating Elements */
.tennis-ball {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #FFD700;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.tennis-ball:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.tennis-ball:nth-child(2) { top: 60%; right: 15%; animation-delay: 2s; }
.tennis-ball:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 4s; }

/* Sections */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Paralaxní sekce s obrázkem */
.parallax-section {
    position: relative;
    min-height: 500px;
    background-image: url('../images/areaal_1.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Paralaxní efekt */
    margin: 4rem 0;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7); /* Průhledná bílá vrstva */
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Na mobilech vypnout fixed attachment (nefunguje dobře) */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
        min-height: 400px;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: linear-gradient(135deg, #f8fffe, #e8f5e8);
    padding-top: 6rem; /* Přiměřená mezera - hero sekce už není 100vh */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.about-image {
    background: linear-gradient(45deg, #4a7c59, #2c5530);
    height: 300px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    box-shadow: 0 20px 40px rgba(44, 85, 48, 0.3);
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 4px solid #FFD700;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.feature-card i {
    font-size: 3rem;
    color: #4a7c59;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

/* News Section */
.news {
    background: #f8f9fa;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.news-image {
    height: 200px;
    background: linear-gradient(45deg, #4a7c59, #FFD700);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.2rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.read-more {
    color: #4a7c59;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #2c5530;
    transform: translateX(5px);
}

/* CTA Members Section */
.cta-members {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Members Section */
.members {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    text-align: center;
}

.members .section-header h2,
.members .section-header p {
    color: white;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    border-color: #FFD700;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 3rem auto 0;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    border-color: #4a7c59;
    background: white;
}

/* Alerts */
.alert {
    padding: 1rem 2rem;
    margin: 1rem 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1001;
    min-width: 300px;
    animation: slideInRight 0.5s ease-out;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #FFD700;
    margin-bottom: 1rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #FFD700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #2c5530;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    /* Hero optimalizace pro tablet */
    .hero {
        min-height: 500px;
        background-position: center 35%; /* Posune důležitý obsah nahoru */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .alert {
        position: static;
        margin: 1rem;
        animation: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Hero optimalizace pro mobil */
    .hero {
        min-height: 400px;
        height: 70vh;
        background-position: center 40%; /* Více uprostřed pro mobil */
    }

    .hero h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .feature-card,
    .news-card {
        margin: 0 1rem;
    }

    .login-form,
    .contact-form {
        margin: 2rem 1rem;
        padding: 2rem;
    }
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 2rem 0.5rem;
    margin-top: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section h3 {
    color: #FFD700;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 0.3rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #FFD700;
}

.footer-section i {
    margin-right: 0.5rem;
    color: #FFD700;
}

.footer-bottom {
    text-align: center;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid #333;
    color: #999;
    font-size: 0.85rem;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 1rem 0.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}