/* ===== FUNDACIÓN APED - CUSTOM STYLES ===== */

/* Variables CSS para fácil personalización */
:root {
    --primary-color: #2E8B57; /* SeaGreen del logo */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #32CD32; /* LimeGreen en gradiente */
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --darker-color: #212529;

    --accent-color: #FF6B6B; /* Corazón del logo */
    --body-font: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    --heading-font: 'Merriweather', Georgia, 'Times New Roman', serif;
    --font-family: var(--body-font);
    --border-radius: 8px;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition: all 0.3s ease;
    --primary-contrast: #ffffff;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

.bg-darker {
    background-color: var(--darker-color) !important;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-family: var(--heading-font);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* ===== HEADER STYLES ===== */
.main-header {
    position: relative;
    z-index: 1000;
}

.top-bar {
    font-size: 0.875rem;
}

.contact-info span {
    font-size: 0.875rem;
}

.social-links a {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
}

.brand-text strong {
    color: var(--primary-color);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('../images/hero/hero-1.jpg') center/cover fixed;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.35) 100%);
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    color: white;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.3s both;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    padding: 5rem 0;
}

.about-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-content h3:first-child {
    margin-top: 0;
}

.stats-row {
    background: var(--light-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* ===== SERVICES SECTION ===== */
.services-section {
    padding: 5rem 0;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.service-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    padding: 5rem 0;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-image:hover .project-overlay {
    opacity: 1;
}

.project-image:hover img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 4px;
}

/* ===== DONATION SECTION ===== */
.donation-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
}

.donation-section h2 {
    margin-bottom: 1rem;
}

.donation-section .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.donation-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 5rem 0;
}

.contact-form-card,
.contact-info-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: 100%;
}

.contact-form .form-control,
.contact-form .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-details h6 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.contact-details p {
    margin-bottom: 0;
    color: var(--secondary-color);
}

.contact-details a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary-color);
}

.office-hours {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.office-hours ul li {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.map-container {
    margin-top: 3rem;
}

.map-placeholder {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===== FOOTER STYLES ===== */
.main-footer {
    margin-top: 5rem;
}

.footer-content {
    padding: 3rem 0;
}

.footer-title {
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.footer-text {
    color: #adb5bd;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.newsletter-form .input-group {
    margin-top: 1rem;
}

.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.newsletter-form .form-control::placeholder {
    color: #adb5bd;
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

.donation-banner {
    padding: 1.5rem 0;
}

.footer-bottom {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal a {
    transition: var(--transition);
}

.footer-legal a:hover {
    color: white !important;
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    background: #128c7e;
    color: white;
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--dark-color);
    transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .stats-row .col-4 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .service-card,
    .project-card {
        margin-bottom: 2rem;
    }
    
    .contact-form-card,
    .contact-info-card {
        margin-bottom: 2rem;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .stats-row {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .footer-content .col-lg-2,
    .footer-content .col-md-6 {
        margin-bottom: 2rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: var(--box-shadow-lg) !important;
}

.rounded-custom {
    border-radius: var(--border-radius) !important;
}

.transition-custom {
    transition: var(--transition) !important;
}

/* ===== PRINT STYLES ===== */
@media print {
    .main-header,
    .whatsapp-float,
    .back-to-top,
    .donation-banner {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 18pt;
    }
}

/* Gallery styles */
.gallery {
  margin-top: 1rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  background: #fff;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.03);
}
.gallery-item:hover img {
    transform: scale(1.03);
}
.gallery-item figcaption {
    padding: 0.75rem 1rem;
}

/* Accesibilidad de enfoque */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===== Carousel Styles ===== */
.hero-section .carousel-img {
    height: 480px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
@media (max-width: 992px) {
    .hero-section .carousel-img { height: 360px; }
}
@media (max-width: 576px) {
    .hero-section .carousel-img { height: 260px; }
}
#carousel .carousel-caption h5 {
    font-weight: 600;
}
#carousel .carousel-caption p {
    color: #f1f1f1;
}

/* ===== HERO SECTION OVERLAYS (mejora de legibilidad) ===== */
.hero-section .carousel-item { position: relative; }
.hero-section .carousel-item::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.55) 100%);
    z-index: 1;
}
.hero-section .carousel-caption { position: absolute; z-index: 2; }