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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(45, 80, 22, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 120px;
    height: auto;
    border-radius: 8px;
}

.logo-text h2 {
    color: #2d5016;
    font-weight: 700;
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2d5016;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2d5016;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a25338c 0%, #00A859 100%), url(images/bg-s1.jpg);
    background-size: cover;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    font-family: 'Playfair Display', serif;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #2d5016;
    color: white;
}

.btn-primary:hover {
    background: #1a3009;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background: #2d5016;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #2d5016;
    border: 2px solid #2d5016;
}

.btn-outline:hover {
    background: #2d5016;
    color: white;
}

.hero-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.hero-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(45, 80, 22, 0.9);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.hero-year {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.hero-legacy {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    padding-top: 5%;
}

.modal:target {
            opacity: 1;
            visibility: visible;
        }

.modal-content {
            position: relative;
            max-width: 90%;
            max-height: 90%;
        }

.modal-image {
            width: 100%;
            height: auto;
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }

.close {
            position: absolute;
            top: -40px;
            right: 0;
            color: white;
            font-size: 30px;
            text-decoration: none;
            font-weight: bold;
            transition: color 0.2s;
        }

.close:hover {
            color: #ccc;
        }

/* Click outside to close */
.modal-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }</style>

/* Section Styles */

#legado {background: linear-gradient(135deg, #1a25338c 0%, #00A859 100%), url(images/bg-repeat.jpg);background-attachment: fixed;}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: #2d5016;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* History Section */
.history {
    padding: 6rem 0;
    background: white;
}

.history-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.history-item {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8faf9;
    border-radius: 12px;
    border-left: 4px solid #2d5016;
}

.history-item h3 {
    color: #2d5016;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.history-item p {
    color: #666;
    line-height: 1.8;
}

.history-image {
    position: sticky;
    top: 100px;
}

.history-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.image-caption {
    text-align: center;
    margin-bottom: 1rem;
    color: #666;
    font-style: italic;
}

/* Legacy Section */
.legacy {
    padding: 6rem 0;
    background: #f8faf9;
    background: linear-gradient(135deg, #1a25338c 0%, #00A859 100%), url(images/bg-repeat.jpg);background-attachment: fixed;
}

.legacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.legacy-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legacy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d5016, #4a7c23);
}

.legacy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.legacy-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2d5016, #4a7c23);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.legacy-icon i {
    font-size: 2rem;
    color: white;
}

.legacy-card h3 {
    color: #2d5016;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.legacy-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.legacy-period {
    background: #e8f5e8;
    color: #2d5016;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
}

/* Timeline Section */
.timeline-section {
    padding: 6rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #2d5016, #4a7c23);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-year {
    background: #2d5016;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    min-width: 100px;
    text-align: center;
    position: relative;
    z-index: 2;
    font-family: 'Playfair Display', serif;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 0 2rem;
    flex: 1;
    border: 2px solid #e8f5e8;
}

.timeline-content h3 {
    color: #2d5016;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.timeline-content p {
    color: #666;
    line-height: 1.6;
}

/* Courses Section */
.courses {
    padding: 6rem 0;
    background: #f8faf9;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

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

.course-card:hover {
    transform: translateY(-5px);
}

.course-video {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.course-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.course-content {
    padding: 2rem;
}

.course-content h3 {
    color: #2d5016;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.course-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.course-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.course-duration,
.course-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* News Section */
.news {
    padding: 6rem 0;
    background: white;
}

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

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

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

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

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

.news-content {
    padding: 2rem;
}

.news-date {
    color: #2d5016;
    font-size: 0.9rem;
    font-weight: 600;
}

.news-content h3 {
    color: #333;
    font-size: 1.3rem;
    margin: 0.5rem 0;
    line-height: 1.4;
    font-family: 'Playfair Display', serif;
}

.news-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-link {
    color: #2d5016;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: #1a3009;
}

.news-cta {
    text-align: center;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: #f8faf9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    color: #2d5016;
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.contact-item h4 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.contact-item p {
    color: #666;
    line-height: 1.6;
}

.contact-item a {
    color: #2d5016;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    font-size: 1rem;
}

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

/* Footer */
.footer {
    background: #2d5016;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 40px;
    height: auto;
    border-radius: 6px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

.footer-bottom a {
    color: #4a7c23;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.iframe-ddisplay {display:block}
.iframe-mdisplay {display:none}

/* Responsive Design */
@media (max-width: 768px) {

    .iframe-ddisplay {display:none}
    .iframe-mdisplay {display:block}

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        margin-top: 100px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .history-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .history-image {
        position: static;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }

    .timeline-item:nth-child(even) {
        flex-direction: row !important;
    }

    .timeline-year {
        position: absolute;
        left: -40px;
        min-width: 80px;
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }

    .timeline-content {
        margin: 0;
    }
}

@media (max-width: 480px) {
    
    .iframe-ddisplay {display:none}
    .iframe-mdisplay {display:block}
    
    .hero-title {
        font-size: 2rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .legacy-grid,
    .courses-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

