:root {
    --primary-color: #2A2D34;
    --secondary-color: #FF6B6B;
    --accent-color: #4ECDC4;
    --hero-gradient: linear-gradient(135deg, #F5F5DC 0%, rgb(255,253,208) 100%);
    --button-gradient: linear-gradient(45deg, #FF6B6B 0%, #FF8E53 100%);
}

.hero {
    background: var(--hero-gradient);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M44.6,-59.1C56.4,-52.1,63.4,-36.9,67.3,-21.3C71.1,-5.6,71.9,10.5,66.3,23.5C60.7,36.5,48.8,46.4,36.5,54.2C24.2,62,11.1,67.7,-2.9,71.8C-16.9,75.9,-33.8,78.5,-45.2,71.4C-56.6,64.3,-62.6,47.6,-68.7,31.4C-74.8,15.2,-81,-0.5,-76.8,-13.1C-72.6,-25.7,-58,-35.3,-44.3,-41.7C-30.6,-48.2,-17.8,-51.6,-1.8,-49.8C14.3,-48,28.6,-41.1,44.6,-59.1Z" fill="%23ffffff" fill-opacity="0.05" transform="translate(100 100)"/></svg>');
    opacity: 0.1;
}


@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: 'Segoe UI', system-ui;
    margin: 0;
    background: rgb(64, 155, 160);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    color: var(--primary-color);
    overflow-x: hidden;
}

.hero {
    text-align: center;
    padding: 12vh 2rem;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #3498dbdd, #2980b9dd);
    z-index: -1;
}

.hero h1 {
    color: black;
    font-size: 4rem;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.2);
    animation: fadeInDown 1s ease, float 4s ease-in-out infinite 1s;
}

.hero p {
    color: black;
    font-size: 1.5rem;
    max-width: 800px;
    margin: 2rem auto;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 1s 0.5s ease forwards;
} 


.cards-container {
    display: grid;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: rgb(255,253,208);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 4px solid var(--secondary-color);
}

.card-content {
    padding: 1.5rem;
}

.card h2 {
    color: var(--secondary-color);
    margin: 0 0 0.5rem 0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: modalFadeIn 0.5s ease;
    overflow-y: auto;
    
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    background: white;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--primary-color);
}

.modal-main-img-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.modal-main-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.thumbnail-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin: 1rem 0;
}

.thumbnail-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail-img.active {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.modal-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-icon {
    font-size: 2rem;
    color: var(--secondary-color);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.donate-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 1rem;
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-nav.prev { left: 1rem; }
.image-nav.next { right: 1rem; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.2rem; }
    .modal-content { margin: 1rem; padding: 1.5rem; }
    .modal-main-img { height: 300px; }
}
.modal-header {
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1001; /* Asigură-te că este deasupra imaginii */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: none;
    color: var(--primary-color);
    font-size: 24px;
}

.modal-main-img-container {
    position: relative;
    z-index: 1000; /* Nivel inferior față de buton */
}

@media (max-width: 768px) {
    .close {
        right: 10px;
        top: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .modal-main-img {
        height: 250px; /* Reducem înălțimea imaginii pe mobil */
    }
}
.card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-bottom: 4px solid var(--secondary-color);
    filter: grayscale(20%);
    transition: all 0.4s ease;
}

.card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}
.card h2 {
    color: var(--secondary-color);
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
}
.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-bottom: 4px solid var(--secondary-color);
    filter: grayscale(20%);
    transition: all 0.4s ease;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: modalFadeIn 0.5s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(255,255,255,0.95);
    max-width: 900px;
    margin: 5vh auto;
    border-radius: 25px;
    padding: 3rem;
    position: relative;
    transform: scale(0.8);
    animation: modalScaleIn 0.4s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalScaleIn {
    to { transform: scale(1); }
}
.mobile-button {
    display: none;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    margin-top: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    opacity: 0; /* Ascundem inițial butonul */
    animation: slideUpFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.6s;
}

.mobile-button:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mobile-button {
        display: inline-block;
    }
    
    .hero {
        padding: 6rem 1rem;
    }
}

@media (max-width: 480px) {
    .mobile-button {
        font-size: 1rem;
        padding: 10px 25px;
    }
}