/* Modern Design for Junta de Vecinos - index_otro.php */

:root {
    --primary: #2563eb;
    /* Royal Blue */
    --primary-dark: #1e40af;
    --secondary: #10b981;
    /* Emerald Green */
    --accent: #f59e0b;
    /* Amber */
    --dark: #0f172a;
    /* Slate 900 */
    --light: #f8fafc;
    /* Slate 50 */
    --gray: #64748b;
    /* Slate 500 */
    --white: #ffffff;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 1rem;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    font-family: var(--font-heading);
    color: var(--primary);
}

.logo img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

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

.hero-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: rotate(0);
}

/* Features/About */
.features {
    padding: 100px 0;
    background-color: var(--white);
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--light);
    padding: 2.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-color: #e2e8f0;
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--gray);
}

/* Stats */
.stats {
    padding: 80px 0;
    background-color: var(--primary);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* News/Events (New Section) */
.news {
    padding: 100px 0;
    background-color: var(--light);
}

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

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.news-image {
    height: 200px;
    background-color: #cbd5e1;
    /* Placeholder color */
    position: relative;
}

.news-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--primary);
}

.news-content {
    padding: 2rem;
}

.news-tag {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.news-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* CTA */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta p {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

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

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

/* Footer */
footer {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-brand p {
    max-width: 300px;
}

.footer-links h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Contact Section (New) */
.contact-section {
    padding: 100px 0;
    background-color: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--light);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.contact-info {
    padding: 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 0.3rem;
}

.info-item h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.contact-form-container {
    padding: 4rem;
    background: var(--white);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 1.2rem;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Mobile Toggle Base */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    z-index: 1001;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        padding: 3rem;
    }
    
    .contact-form-container {
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 320px; /* Optional: limit width on larger phones */
    }
    
    .hero-image {
        display: none; /* Hide image on small mobile for cleaner look, or align it */
    }

    .feature-grid, .stats-grid, .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand p {
        margin: 0 auto;
    }
}