:root {
    --primary: #2ecc71;
    --primary-dark: #27ae60;
    --accent: #3498db;
    --teaming: #1f94a8;
    --dark: #2d3436;
    --gray: #636e72;
    --light: #fdfdfd;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --border-radius: 20px;
}

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

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

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

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

/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

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

nav ul a {
    font-weight: 600;
    color: var(--gray);
}

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

/* Hero */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../assets/img/hero_bg.jpg') center/cover;
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    gap: 0.75rem;
}

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

.btn-teaming { background: var(--teaming); color: white; }
.btn-teaming:hover { background: #167d8d; transform: translateY(-3px); }

/* Sticky Donation Button (Mobile) */
.sticky-donate {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    z-index: 999;
    padding: 1rem;
    border-radius: 50%;
    background: var(--teaming);
    color: white;
    box-shadow: 0 10px 20px rgba(31, 148, 168, 0.4);
    display: flex;
}

@media (min-width: 769px) {
    .sticky-donate {
        bottom: 3rem;
        right: 3rem;
        padding: 1.25rem 2rem;
        border-radius: 50px;
    }
    .sticky-donate span { display: inline; margin-left: 0.5rem; }
}

/* Utility Classes */
.d-none { display: none !important; }
.d-md-flex { display: none !important; }
.d-md-none { display: flex !important; }

@media (min-width: 769px) {
    .d-md-flex { display: flex !important; }
    .d-md-none { display: none !important; }
}

/* Footer Styling */
.site-footer {
    background: var(--dark);
    color: white;
    padding: 5rem 0 3rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-text {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: #a0aec0;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.subvencion-logo {
    height: 180px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .logo-text { display: none; }
    
    .site-footer { text-align: center; padding: 4rem 0 2rem; }
    .footer-grid { gap: 3rem; }
    .footer-section .logo { justify-content: center; }
    .footer-links a:hover { padding-left: 0; }
    
    .subvencion-logo { height: 120px; }

    nav#main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        flex-direction: column;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-top: 1px solid #edf2f7;
    }
    
    nav#main-nav.active {
        display: flex;
    }
    
    nav#main-nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .sticky-donate span { display: none; }
}

/* Section Common */
section { padding: 5rem 0; }
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title h2 { font-size: 2.5rem; font-weight: 800; }
.section-title p { color: var(--gray); font-size: 1.1rem; }

/* Grid Utilities */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Card Component */
.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .card { padding: 1.5rem !important; }
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Sections */
.animal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.animal-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.animal-card:hover { transform: translateY(-10px); }

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

.animal-info { padding: 1.5rem; }
.animal-info h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.animal-info .badge {
    background: #f1f2f6;
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Exit Intent Modal */
.exit-intent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.exit-intent-modal {
    background: white;
    max-width: 500px;
    width: 100%;
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s ease-out;
}

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

.exit-intent-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.exit-intent-close:hover {
    background: #e2e8f0;
    color: var(--dark);
}

.exit-intent-icon {
    width: 80px;
    height: 80px;
    background: #fff7ed;
    color: #f97316;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
}

.exit-intent-modal h2 {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--dark);
    line-height: 1.2;
}

.exit-intent-modal p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

@media (max-width: 500px) {
    .exit-intent-modal { padding: 2rem 1.5rem; }
    .exit-intent-modal h2 { font-size: 1.5rem; }
}
