/* Reset y variables CSS */
:root {
    --primary-color: #2c5f2d;
    --secondary-color: #97c55c;
    --accent-color: #d4a574;
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --white: #ffffff;
    --text-color: #333333;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

/* Header y Navegación */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo .tagline {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: -5px;
}

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

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M50 10L61 35h27L68 53l10 25-28-20-28 20 10-25L12 35h27z" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.1;
}

.hero-overlay {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

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

.btn {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--light-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

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

/* Secciones generales */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: #666;
    line-height: 1.8;
}

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

.federation-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.federation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.federation-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.federation-card p {
    color: #666;
    line-height: 1.6;
}

/* Governance */
.governance {
    background: linear-gradient(to bottom, var(--light-color), var(--white));
}

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

.governance-item {
    background-color: var(--white);
    padding: 2rem;
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.governance-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.governance-item p {
    color: #666;
}

/* Associations */
.associations {
    background-color: var(--white);
}

.map-container {
    background: linear-gradient(135deg, var(--light-color), #e8f5e9);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 3rem;
    border: 2px solid var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.spain-map {
    max-width: 650px;
    height: auto;
    width: 100%;
    display: block;
    margin: 0 auto;
    cursor: pointer;
}

.map-area {
    cursor: pointer;
    outline: none;
}

.map-area:hover {
    opacity: 0.7;
}

.map-tooltip {
    position: fixed;
    background: rgba(44, 95, 45, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: none;
}


.map-placeholder {
    font-size: 3rem;
    color: var(--primary-color);
}

.associations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.association-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.association-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.association-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, #ffffff, #f0f8f0);
}

.association-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.association-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.representative {
    font-weight: 600;
    color: var(--accent-color);
}

.status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.status.member {
    background-color: #e8f5e9;
    color: var(--primary-color);
}

.status.pending {
    background-color: #fff3e0;
    color: #e65100;
}

/* Principles */
.principles {
    background-color: var(--light-color);
}

.principles-list {
    display: grid;
    gap: 2rem;
}

.principle-item {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.principle-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-hover);
}

.principle-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    min-width: 60px;
}

.principle-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.principle-item p {
    color: #666;
}

/* Representation */
.representation {
    background-color: var(--white);
}

.institutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.institution {
    background-color: var(--light-color);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.institution:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: scale(1.05);
}

/* Adhesion */
.adhesion {
    background: linear-gradient(to bottom, var(--light-color), var(--white));
}

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

.info-box {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
}

.info-box ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.fee {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.contact-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.contact-section h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-details {
    font-size: 1.1rem;
}

.contact-details a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

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

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: #ccc;
}

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

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: var(--shadow);
        padding: 1rem;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 1rem 0;
        border-bottom: 1px solid var(--light-color);
    }

    .menu-toggle {
        display: flex;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

    .federation-grid,
    .associations-grid {
        grid-template-columns: 1fr;
    }

    .principle-item {
        flex-direction: column;
        text-align: center;
    }

    .principle-number {
        min-width: auto;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .logo .tagline {
        font-size: 0.75rem;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    section {
        padding: 50px 0;
    }

    .map-placeholder {
        font-size: 2rem;
    }
}
