/* LANGUAGE SWITCHER & NAVIGATION */
header {
    background-color: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0; 
    z-index: 1000;
    height: 64px;
    border-radius: 0 0 12px 12px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    flex-wrap: nowrap;
    gap: 10px;
    color: var(--color-primary);
    width: 100%;
}

header .container {
    display: flex;
    align-items: center;
    height: 100%;
    padding-top: 8px;
    padding-bottom: 8px;
}

.logo {
    font-family: var(--font-body);
    font-size: 1.25rem; 
    font-weight: 800;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.1;
    height: 100%;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo img {
    height: 46px; 
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.94rem;
    position: relative;
    padding: 6px 8px;
    border-radius: 10px;
    color: var(--color-primary);
    transition: color 0.25s ease, background-color 0.25s ease;
    white-space: nowrap;
    line-height: 1.15;
}

.nav-links a::after {
    content: none;
}

body[dir="rtl"] .nav-links a::after {
    content: none;
}

.nav-links a:hover {
    color: #15634f;
    background-color: rgba(13, 64, 53, 0.07);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    border: 1px solid rgba(13,64,53,0.25);
    border-radius: 10px;
    flex-shrink: 0;
    margin-left: 12px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 20px;
}

.lang-btn {
    border: 1px solid rgba(13,64,53,0.25);
    background: rgba(13,64,53,0.06);
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.86rem;
    padding: 6px 7px;
    border-radius: 10px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-weight: 700;
}

.lang-btn:hover {
    background: rgba(13,64,53,0.12);
    color: #15634f;
}

.lang-btn.active {
    background: rgba(13,64,53,0.18);
    border-color: rgba(13,64,53,0.35);
    color: var(--color-primary);
}

/* HERO */
#hero {
    height: 95vh;
    min-height: 600px;
    background: linear-gradient(rgba(10, 61, 46, 0.8), rgba(10, 61, 46, 0.6)), url('../Bilder/Mekka.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-white);
    margin-top: 0;
    padding-top: calc(var(--lang-bar-height) + var(--header-height) + 10px); 
}

.hero-content h1 {
    color: var(--color-white);
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* EVENTS */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.event-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--color-accent);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.event-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-date {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.event-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.event-card p {
    color: #666;
    margin-bottom: 0;
    flex-grow: 1;
}

/* PRAYER TIMES */
#prayer-times {
    background-color: var(--color-bg-light);
    padding-bottom: 40px;
}

.prayer-container {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid #eee;
    margin-top: 20px;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    text-align: center;
    margin-top: 20px;
}

.prayer-item {
    background-color: #f4f6f5;
    padding: 15px 10px;
    border-radius: 8px;
    border-bottom: 3px solid var(--color-primary);
    transition: var(--transition);
}

.prayer-item:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-bottom-color: var(--color-accent);
}

.prayer-name {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.prayer-time {
    display: block;
    font-size: 1.3rem;
    font-family: var(--font-heading);
    color: var(--color-accent);
}

.prayer-item:hover .prayer-time {
    color: var(--color-white);
}

.prayer-source {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 20px;
}

/* DUA */
.dua-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dua-card {
    background-color: var(--color-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid #eee;
    transition: var(--transition);
}

.dua-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.dua-card h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.dua-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--color-bg-light);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dua-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* DONATE */
#donate {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

#donate .section-title {
    color: var(--color-white);
}

.donate-text {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
}

.donation-note {
    font-size: 0.85rem;
    margin-top: 10px;
    color: #ccc;
    font-style: italic;
    max-width: 200px;
    line-height: 1.4;
}

.donation-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.donation-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.btn-donate {
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
    border: 1px solid var(--color-accent);
    padding: 15px 30px;
    border-radius: 30px;
    transition: var(--transition);
    min-width: 180px;
}

.btn-donate:hover {
    background: var(--color-accent);
    color: var(--color-primary);
}

/* CAROUSEL */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 30px auto 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background-color: #eee;
    height: 450px;
}

.carousel-item {
    display: none;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #777;
    font-weight: bold;
    background-color: #e0e0e0;
    animation: fade 1s;
}

.carousel-item.active {
    display: flex;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    transition: 0.3s;
    user-select: none;
    z-index: 10;
}

.prev-btn {
    left: 0;
    border-radius: 0 5px 5px 0;
}

.next-btn {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--color-accent);
}

body[dir="rtl"] .prev-btn {
    left: auto;
    right: 0;
    border-radius: 5px 0 0 5px;
    transform: translateY(-50%) rotate(180deg);
}

body[dir="rtl"] .next-btn {
    right: auto;
    left: 0;
    border-radius: 0 5px 5px 0;
    transform: translateY(-50%) rotate(180deg);
}

.carousel-dots {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.4s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.dot.active, .dot:hover {
    background-color: var(--color-accent);
    transform: scale(1.2);
}

@keyframes fade {
    from {opacity: .6} 
    to {opacity: 1}
}

/* ABOUT */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

body[dir="rtl"] .about-layout {
    text-align: right;
}

.board-members {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.member {
    text-align: center;
}

.member h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.member span {
    color: #777;
    font-size: 0.9rem;
}

/* CONTACT */
#contact {
    background-color: #f0f2f1;
}

.contact-container {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-form {
    flex: 1;
    background: var(--color-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    background-color: #fff;
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

body[dir="rtl"] .contact-info {
    text-align: right;
}

.info-item {
    margin-bottom: 0;
    background: var(--color-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid #eee;
    line-height: 1.6;
}

.info-item h4 {
    margin-bottom: 10px;
    color: var(--color-primary);
}

.info-item a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.info-item a:hover {
    border-bottom-color: var(--color-primary);
}

.contact-persons h5 {
    margin: 12px 0 6px;
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 700;
}

.contact-persons p {
    margin: 0;
    line-height: 1.5;
}

.map-placeholder {
    width: 100%;
    height: 250px;
    background-color: var(--color-placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding: 20px;
}

/* QA */
#qa {
    background-color: var(--color-white);
}

.qa-list {
    max-width: 800px;
    margin: 0 auto;
}

.qa-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.qa-question {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.qa-answer {
    color: #555;
    padding-left: 20px;
    border-left: 3px solid var(--color-accent);
}

body[dir="rtl"] .qa-answer {
    padding-left: 0;
    padding-right: 20px;
    border-left: none;
    border-right: 3px solid var(--color-accent);
}

.qa-intro {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
}

/* MODAL */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%; 
    max-width: 800px; 
    border-radius: 8px;
    position: relative;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: slideIn 0.3s;
    max-height: 85vh; 
    overflow-y: auto;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 5px;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
}

body[dir="rtl"] .close-modal {
    right: auto;
    left: 15px;
    float: left;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

/* DONATION MODAL STYLES */
.donation-modal-content {
    max-width: 900px !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.donation-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0d5a48 100%);
}

.donation-modal-header h2 {
    color: var(--color-white);
    margin: 0;
    font-size: 1.8rem;
}

.donation-modal-header .close-modal {
    color: var(--color-white);
    position: static;
    float: none;
    font-size: 28px;
}

.donation-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 30px;
    text-align: center;
}

.donation-card-type {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.donation-card-amount {
    font-size: 2.5rem;
    color: var(--color-primary);
    font-weight: bold;
    margin: 15px 0;
}

.donation-card-divider {
    height: 1px;
    background-color: #ddd;
    margin: 20px 0;
}

.donation-card-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: var(--color-primary);
}

.donation-form {
    padding: 25px 30px 30px;
}

.bank-info-box {
    background-color: #f9f9f9;
    border-left: 4px solid var(--color-accent);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: left;
}

.donation-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 12px 20px;
    border: 2px solid #ddd;
    background-color: var(--color-white);
    color: var(--color-primary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.amount-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.amount-btn.active {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.custom-amount-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.custom-amount-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.btn-donate-primary {
    width: 100%;
    padding: 15px 20px;
    background-color: #f4c430;
    color: var(--color-primary);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(244, 196, 48, 0.3);
}

.btn-donate-primary:hover {
    background-color: #e0b020;
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.4);
    transform: translateY(-2px);
}

.btn-donate-primary:active {
    transform: translateY(0);
}

.payment-method-btn {
    padding: 15px 20px;
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.payment-method-btn:hover {
    border-color: var(--color-accent);
    background-color: #fafafa;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.payment-method-btn:active {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.partner-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.partner-item a {
    display: block;
    padding: 20px;
    border: 2px solid #eee;
    border-radius: 8px;
    min-width: 220px;
    transition: var(--transition);
    background: #fff;
}

.partner-item a:hover {
    border-color: var(--color-accent);
    background-color: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.partner-item strong {
    font-size: 1.1rem;
    color: var(--color-primary);
    display: block;
    margin-bottom: 5px;
}

@keyframes fadeIn {
    from {opacity: 0} 
    to {opacity: 1}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;} 
    to {transform: translateY(0); opacity: 1;}
}

/* FOOTER */
footer {
    background-color: #051f17;
    color: #aaa;
    padding: 60px 0 30px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-links {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    margin: 0;
    padding: 5px 10px;
    color: var(--color-accent);
}

.footer-links a:hover {
    color: var(--color-white);
}

.social-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 20px;
    margin-bottom: 40px;
}

.social-group {
    text-align: center;
}

.social-group h5 {
    color: var(--color-accent);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.social-icons-row {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
    color: var(--color-white);
    border: 1px solid rgba(255,255,255,0.2);
}

.social-icon:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-3px);
    border-color: var(--color-accent);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ACCORDION / COLLAPSIBLE SECTIONS */
.accordion-header {
    display: block;
}
.accordion-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 4px; /* reduced vertical/horizontal padding */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    border-radius: 6px;
    vertical-align: middle;
}
.accordion-toggle:focus {
    outline: 2px solid rgba(21,99,79,0.12);
}
.accordion-toggle .section-title {
    margin: 0;
    font-size: 1.45rem; /* slightly smaller to reduce visual gap */
    line-height: 1.05;
    display: inline-block;
    position: relative;
    padding-bottom: 0;
}
.accordion-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    transition: transform 0.28s ease;
    color: #d4af37;
    line-height: 0.8;
    transform-origin: center;
    flex-shrink: 0;
    margin-top: -44px;
}
.accordion-toggle.open .accordion-arrow {
    transform: rotate(180deg);
}
.accordion-content {
    overflow: hidden;
    transition: max-height 0.32s ease, padding 0.18s ease, margin-bottom 0.32s ease;
    max-height: 2000px;
    padding-top: 8px; /* further reduced gap between header and content */
    margin-bottom: 0;
}
.accordion-content:not(.collapsed) {
    margin-bottom: 20px; /* large spacing when open */
}
.accordion-content.collapsed {
    max-height: 0;
    padding-top: 0;
}

/* Make header visually consistent on small screens */
@media (max-width: 900px) {
    .accordion-toggle .section-title { font-size: 1.05rem; }
    .accordion-arrow { font-size: 2.2rem; }
}

/* Reduce spacing between the accordion sections themselves to make layout more compact */
#prayer-times, #duas, #marriage, #media, #about {
    padding-top: 2px;
    padding-bottom: 2px;
    margin-bottom: 0;
}

/* Slightly reduce container top margins inside those sections */
.container > .prayer-container, .container > .dua-grid, .container > .carousel-container, .container > .about-layout {
    margin-top: 2px;
}
