/* =====================================================
   Responsive Tasarım - Mobil Uyum
   ===================================================== */

/* Tablet (768px ve altı) */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer: marka tam genişlik, linkler yan yana (tablet + mobil) */
    .site-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "brand brand"
            "quick edu"
            "social social";
        gap: 1.25rem 1rem;
    }

    .site-footer .footer-col.footer-about {
        grid-area: brand;
    }

    .site-footer .footer-grid > .footer-col:nth-child(2) {
        grid-area: quick;
    }

    .site-footer .footer-grid > .footer-col:nth-child(3) {
        grid-area: edu;
    }

    .site-footer .footer-grid > .footer-col:nth-child(4) {
        grid-area: social;
    }

    .two-col,
    .two-col-sidebar {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: auto;
        padding-bottom: 35%;
    }

    .slider-content h1 {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    /* Prayer Times */
    .prayer-times-inner {
        flex-direction: column;
    }

    .prayer-times-title {
        width: 100%;
        justify-content: center;
        padding: 12px 15px;
        gap: 8px;
    }

    .prayer-times-title small {
        display: inline;
        margin-top: 0;
        margin-left: 5px;
    }

    .prayer-times-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px 15px 20px;
        width: 100%;
    }

    .prayer-time-item {
        background: rgba(255, 255, 255, 0.08); /* Kart görünümü için hafif beyaz arka plan */
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 12px 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: none; /* override flex-basis */
        width: auto;
    }

    .prayer-time-item::after {
        display: none;
    }
}

/* Mobil menü */
@media (max-width: 768px) {
    .top-bar-left {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1095;
        overflow-y: auto;
        gap: 0;
        align-items: stretch;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        padding: 14px 16px;
        border-bottom: 1px solid var(--light-gray);
        justify-content: flex-start;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.donate-btn {
        margin: 10px 0;
        text-align: center;
        justify-content: center;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: var(--off-white);
        display: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    /* Overlay — base styles now in style.css */

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero */
    .hero-slider {
        height: auto;
        padding-bottom: 55%; /* Daha kompakt mobil dikey oran */
    }

    .slider-overlay {
        justify-content: center;
        text-align: center;
    }

    .slider-content {
        max-width: 100%;
        padding: 20px 15px 30px;
    }

    .slider-content h1 {
        font-size: 1.6rem;
    }

    .slider-content p {
        font-size: 0.95rem;
    }

    /* Footer — mobil: kompakt grid, taşma yok, hizalı bloklar */
    .site-footer .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "brand brand"
            "quick edu"
            "social social";
        gap: 1.15rem 0.9rem;
        align-items: start;
    }

    .site-footer .footer-col.footer-about {
        grid-area: brand;
        min-width: 0;
        text-align: left;
    }

    .site-footer .footer-grid > .footer-col:nth-child(2) {
        grid-area: quick;
        min-width: 0;
        text-align: left;
    }

    .site-footer .footer-grid > .footer-col:nth-child(3) {
        grid-area: edu;
        min-width: 0;
        text-align: left;
    }

    .site-footer .footer-grid > .footer-col:nth-child(4) {
        grid-area: social;
        min-width: 0;
        text-align: left;
    }

    .site-footer .footer-logo {
        justify-content: flex-start;
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .site-footer .footer-logo span,
    .site-footer .footer-site-name {
        max-width: 100%;
        flex: 1 1 12rem;
    }

    .site-footer .footer-contact-info p {
        justify-content: flex-start;
    }

    .site-footer .footer-col:nth-child(2) .footer-links a,
    .site-footer .footer-col:nth-child(3) .footer-links a {
        justify-content: flex-start;
    }

    .site-footer .social-links {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .site-footer.site-footer--compact .footer-col h3 {
        font-size: 0.76rem;
        letter-spacing: 0.03em;
        padding-left: 10px;
        border-left-width: 3px;
    }

    .site-footer .footer-links a {
        font-size: 0.86rem;
    }

    .site-footer .footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .newsletter-section {
        padding: 24px 0;
    }

    .newsletter-section h3 {
        padding: 0 4px;
    }

    .newsletter-form button {
        width: 100%;
    }

    /* Quick Menu */
    .quick-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .quick-menu-item {
        padding: 20px 15px;
    }

    .quick-menu-item i {
        font-size: 2rem;
    }

    /* Cards */
    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* Auth */
    .auth-card {
        padding: 30px 25px;
    }

    .auth-card.wide {
        max-width: 100%;
    }

    /* Page Header */
    .page-header {
        padding: 35px 0;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    /* Section */
    .section {
        padding: 15px 0;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    /* Tables */
    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    /* Bank info */
    .bank-info-card {
        padding: 25px;
    }

    .bank-detail {
        flex-direction: column;
        gap: 4px;
    }
}

/* Küçük mobil (480px ve altı) */
@media (max-width: 480px) {
    :root {
        --fab-offset-right: 20px;
        --fab-offset-bottom: 20px;
        --fab-size: 40px;
    }

    /* Çok dar ekranda KVKK bandı daha yüksek olabiliyor (style.css 768: 128px) */
    body.has-kvkk-banner {
        --fab-banner-extra: 144px;
    }

    html {
        font-size: 14px;
    }

    .hero-slider {
        height: auto;
        padding-bottom: 65%; /* Küçük mobil - daha kompakt */
    }

    .slider-content {
        max-width: 100%;
        padding: 15px 15px 25px;
    }

    .slider-content h1 {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .slider-content p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .quick-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .quick-menu-item {
        padding: 15px 10px;
    }

    .quick-menu-item i {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .quick-menu-item h4 {
        font-size: 0.82rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .container {
        padding: 0 15px;
    }

    .site-footer.site-footer--compact .footer-main {
        padding: 26px 0 16px;
    }

    .site-footer .footer-grid {
        gap: 1rem 0.65rem;
    }

    .site-footer .footer-logo img {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
    }

    .site-footer .social-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .newsletter-section {
        padding: 20px 0;
    }

    .floating-email > i {
        font-size: 1rem;
    }

    .floating-email:hover,
    .floating-email:focus-visible {
        max-width: min(220px, calc(100vw - 32px));
    }

    .floating-email .floating-text {
        font-size: 0.78rem;
    }

    .user-menu-top {
        gap: 8px;
        font-size: 0.78rem;
    }

    .language-switch .lang-btn {
        font-size: 0.72rem;
        padding: 2px 5px;
    }
}

/* ---- Admin Responsive ---- */
@media (max-width: 992px) {
    .admin-sidebar {
        left: -260px;
        transition: left 0.3s ease;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header .sidebar-toggle {
        display: flex;
    }

    .admin-header {
        padding: 12px 15px;
    }

    .admin-header h1 {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .admin-card {
        padding: 20px;
    }

    .admin-content {
        padding: 15px;
    }

    .admin-grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-form .form-row {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-search .form-control {
        width: 100%;
    }

    /* Sidebar close button — mobilde görünür */
    .sidebar-close {
        display: block;
    }

    /* Responsive table */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-info h3 {
        font-size: 1.3rem;
    }

    .action-btns {
        flex-wrap: wrap;
    }
}

/* MOBİL – Duyuru kartlarında resim üstte, yazı altta */
@media (max-width: 768px) {

  /* Kart iç düzeni: her ne ise (grid/flex) tek kolona çevir */
  .announcements-list .announcement-card .announcement-content {
    display: block !important;                 /* grid/flex yerine blok akış */
    grid-template-columns: none !important;    /* varsa grid kolonlarını kapat */
    gap: 0 !important;                         /* fazla boşlukları sıfırla */
  }

  /* Görsel bloğu üste gelsin */
  .announcements-list .announcement-card .announcement-image {
    order: 0 !important;       /* flex kullanılıyorsa sırayı zorla */
    margin: 0 0 12px 0 !important;
    width: 100% !important;
  }

  /* Görsel tam genişlik – oranı koru */
  .announcements-list .announcement-card .announcement-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    border-radius: 12px;
  }

  /* Metin bloğu altta kalsın ve tam genişlikte olsun */
  .announcements-list .announcement-card .announcement-text {
    order: 1 !important;        /* flex varsa sıralamayı garanti et */
    width: 100% !important;
    padding: 0 2px;              /* kenarlardan çok az boşluk */
  }
}