/* Extracted styles from index2.php */
/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #e74c3c;
    text-decoration: none;
}

.logo span {
    color: #3498db;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #e74c3c;
}

.donate-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.donate-btn:hover {
    background-color: #c0392b;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-alert {
    margin: 0 auto 28px;
    max-width: 900px;
    text-align: left;
    background: rgba(245, 158, 11, 0.2);
    border: 2px solid #f59e0b;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18), 0 10px 25px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
}

.hero-alert p {
    margin: 0;
    color: #fff8eb;
    font-size: 18px;
    line-height: 1.55;
}

.btn-hero-donate {
    display: inline-flex;
    margin-top: 14px;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #ef4444, #f97316);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.btn-hero-donate:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: #333;
}

.btn-tertiary {
    background-color: #333;
    color: white;
}

.btn-tertiary:hover {
    background-color: white;
    color: #c0392b;
}

/* Botón Seguir en Facebook */
.btn-facebook {
    background-color: #1877f2; /* Facebook brand blue */
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.12);
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.btn-facebook:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(24, 119, 242, 0.16);
    opacity: 0.98;
}

/* Botón Seguir en X (Twitter) */
.btn-twitter {
    background-color: #000000; /* X/Twitter brand black */
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.btn-twitter:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
    background-color: #1a1a1a;
}

.btn-twitter i {
    font-size: 16px;
    font-weight: 900;
}

/* Wrapper para centrar el iframe de Facebook en la sección CTA */
.fb-iframe-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}

.fb-iframe-wrapper iframe {
    width: 340px; /* tamaño por defecto */
    height: 70px;
    border: none;
    overflow: hidden;
}

/* Hacer el iframe responsivo en pantallas pequeñas */
@media (max-width: 480px) {
    .fb-iframe-wrapper iframe {
        width: 100%;
        height: 90px; /* un poco más alto en móvil para mejor visual */
    }
}


/* About Section */
.about {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 15px;
}

.section-title p {
    color: #777;
    max-width: 600px;
    margin: 0 auto;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-img {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.about-text p {
    margin-bottom: 20px;
    color: #666;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #e74c3c;
    display: block;
}

.stat-label {
    color: #777;
    font-size: 14px;
}

/* Causes Section */
.causes {
    padding: 80px 0;
}

.causes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cause-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.cause-card:hover {
    transform: translateY(-10px);
}

.cause-img {
    height: 200px;
    overflow: hidden;
}

.cause-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.cause-card:hover .cause-img img {
    transform: scale(1.1);
}

.cause-content {
    padding: 20px;
}

.cause-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.cause-desc {
    color: #777;
    margin-bottom: 15px;
}

.progress-bar {
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #e74c3c;
    border-radius: 4px;
}

.cause-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 14px;
}

/* CTA Section */
.cta {
    background: linear-gradient(rgba(231, 76, 60, 0.9), rgba(231, 76, 60, 0.9)), url('https://images.unsplash.com/photo-1559027615-cfa4625723c8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80') no-repeat center center/cover;
    padding: 80px 0;
    text-align: center;
    color: white;
}

.cta h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 18px;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #e74c3c;
}

.footer-col p {
    color: #bbb;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e74c3c;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #e74c3c;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .causes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 15px;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .hero h1 {
        font-size: 36px;
    }

    .hero-alert {
        text-align: center;
        padding: 16px 14px;
    }

    .hero-alert p {
        font-size: 16px;
    }

    .btn-hero-donate {
        display: flex;
        width: 100%;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
    
    .causes-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Nuevas reglas: forzar btn-tertiary full-width en mobile y evitar salto de línea */
    .btn-tertiary {
        display: block !important;
        width: 100% !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure CTA and hero buttons stack and center icon+text on mobile */
    .cta .btn,
    .hero-btns .btn {
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100% !important;
        box-sizing: border-box;
        white-space: nowrap; /* keep icon and text on one line */
    }

    /* Keep tertiary button text on one line and safely truncate if needed */
    .btn-tertiary {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Add spacing between consecutive buttons so they don't overlap */
    .cta .btn + .btn,
    .hero-btns .btn + .btn {
        margin-top: 12px;
    }
}

/* Estilos nuevos: sección y form-card más atractivos */
.section {
    padding: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(245,247,250,0.95) 100%);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(31, 41, 55, 0.06);
    margin-top: 18px;
    backdrop-filter: blur(4px);
}

.form-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border-radius: 12px;
    padding: 24px;
    max-width: 820px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    transition: transform .18s ease, box-shadow .18s ease;
}

.form-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.12);
}

/* Form layout */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.form-row label {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}

input[type="text"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e6eef6;
    background: linear-gradient(180deg,#fff,#fbfdff);
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: box-shadow .12s ease, border-color .12s ease, transform .08s ease;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.08);
    transform: translateY(-1px);
}

textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

/* File input: estilizado simple */
input[type="file"] {
    padding: 8px 10px;
    background: transparent;
}

/* Botón principal */
.btn-primary {
    background: linear-gradient(90deg,#ef4444,#f97316);
    border: none;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.12);
    cursor: pointer;
    font-weight: 700;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.16);
    opacity: 0.98;
}

/* Mensajes y ayuda */
.muted {
    color: #546e7a;
    font-size: 13px;
}

.form-card .muted {
    margin-bottom: 10px;
    color: #6b7280;
}

/* Errores y éxito refinados */
.form-card[style*="background:#e8f5e9"] {
    border-left: 4px solid #2e7d32;
}

.form-card[style*="background:#fff1f0"] {
    border-left: 4px solid #b91c1c;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 15px;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
    
    .causes-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Nuevas reglas: forzar btn-tertiary full-width en mobile y evitar salto de línea */
    .btn-tertiary {
        display: block !important;
        width: 100% !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure CTA and hero buttons stack and center icon+text on mobile */
    .cta .btn,
    .hero-btns .btn {
        display: flex !important;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100% !important;
        box-sizing: border-box;
        white-space: nowrap; /* keep icon and text on one line */
    }

    /* Keep tertiary button text on one line and safely truncate if needed */
    .btn-tertiary {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Add spacing between consecutive buttons so they don't overlap */
    .cta .btn + .btn,
    .hero-btns .btn + .btn {
        margin-top: 12px;
    }
}

/* Ensure share buttons inside the form-card meta stack on mobile and each take full width.
   This also neutralizes the inline margin-left used on the second button when on small screens. */
@media (max-width: 768px) {
    .form-card .meta {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .form-card .meta .btn {
        display: block;
        width: 100% !important; /* ensure full width even if other rules exist */
        margin-left: 0 !important; /* override inline style on the button */
    }
    /* Center the text of the Facebook share button on small screens */
    .form-card .meta #share-fb {
        text-align: center;
        justify-content: center; /* in case some buttons use flex children */
    }
}
