/* Reset básico */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    padding-top: 100px; /* Espacio para el menú fijo */
    background-color: whitesmoke;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #8b2222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 100px;
    box-sizing: border-box;
    z-index: 1000;
}
h2, h3 {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8b2222;
}


.logo {
    height: 90px;
    width: auto;
    padding: 16px;
    border-radius: 16px;
    background-color: white;
    box-sizing: border-box;
}

.menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.menu li a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    padding: 0.5em 1em;
    border-radius: 8px;
    transition: 0.3s;
}

.menu li a:hover {
    background-color: white;
    color: #8b2222;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.seccion {
    background-color: white;
    padding: 60px 20px;
    text-align: center;
}

.seccion h2 {
    color: #8b2222;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.seccion p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: auto;
    color: #555;
}

.seccion2 {
    background-color: whitesmoke;
    padding: 60px 20px;
    max-width: 1200px;
    margin: auto;
}

.seccion2 h3 {
    font-size: 1.8rem;
    color: #8b2222;
    margin-bottom: 10px;
    text-align: center;
}

.seccion2 p {
    font-size: 1.05rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 40px auto;
    text-align: center;
}

.cartas {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;
}

.carta {
    flex: 1 1 300px;
    max-width: 300px;
    background-color: #8b2222;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

 

.carta:hover {
    transform: translateY(-8px);
     box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.carta h4 {
    color: whitesmoke;
    font-size: 1.2rem;
}

.carta p {
    font-size: 0.95rem;
    color: whitesmoke;
}

.extra {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 10px;
}

.carta.activa .extra {
    max-height: 500px;
    opacity: 1;
}

.extra img {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.social-icons {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 20px;
}

.social-icons a {
    display: inline-block;
    width: 60px;
    height: 60px;
}

.social-icons img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-icons a:hover img {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Eventos solidarios sección */
.seccion[style*="background-color: #fff"] {
    background-color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.seccion[style*="background-color: #fff"] h2 {
    color: #8b2222;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.seccion[style*="background-color: #fff"] p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: auto;
    color: #555;
}

.seccion[style*="background-color: #fff"] img {
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
    border-radius: 10px;
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #8b2222;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.4s ease;
    }
    .menu.show {
        padding: 1rem 0;
        max-height: 300px;
        opacity: 1;
    }
    .menu li a {
        font-size: 1.2rem;
        padding: 0.75em 1.5em;
    }
    nav {
        flex-wrap: wrap;
        height: auto;
        justify-content: space-between;
    }
    .logo {
        height: 80px;
        padding: 16px;
        margin-top: 12px;
        margin-bottom: 12px;
        display: block;
        border-radius: 12px;
        background-color: white;
        text-align: center;
    }

    .carta {
    max-height: none;
  }

  .carta.activa .extra {
    height: auto;
    max-height: none;
    opacity: 1;
    overflow: visible;
  }
}

@media (max-width: 480px) {
    .noticia {
        padding: 8px;
    }
    .noticia h3 {
        font-size: 1.2rem;
    }
    .noticia p {
        font-size: 0.85rem;
    }
    .imagen-noticia {
        width: 100%;
        height: auto;
    }
    form {
        width: 95%;
        padding: 20px;
        max-width: 100%;
        margin: 0 auto;
    }
    input, textarea {
        font-size: 0.9rem;
    }
    .noticia h3 {
        font-size: 1rem;
    }
}

/* Noticias estilos */
.noticia {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.noticia:hover {
    transform: scale(1.02);
}

.noticia h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.noticia p {
    font-size: 1rem;
    color: #666;
}

.imagen-noticia {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    object-fit: cover;
}

/* Formulario estilos */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
}

input, textarea {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #c62828;
    outline: none;
}

button {
    padding: 12px 20px;
    font-size: 1rem;
    background-color: #c62828;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #b71c1c;
}

label {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 8px;
}

p.instruction {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
}

.error {
    color: red;
    font-size: 0.9rem;
    margin-top: 5px;
}

