/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #2c5530 0%, #1e3a2e 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand .logo {
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-list li {
    margin: 0 1rem;
    position: relative;
}

.nav-list a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-list a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    color: #333;
    padding: 0.75rem 1rem;
    border-radius: 0;
    display: block;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile / Responsive Navbar */
@media (max-width: 900px) {
    .nav-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px; /* larger tap target */
    z-index: 1101; /* above fixed header menu */
    }

    /* Make the nav menu collapse into a full-width dropdown panel */
    .nav-menu {
        position: fixed;
        top: 64px; /* leaves header visible */
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #2c5530 0%, #1e3a2e 100%);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        transform: translateY(-100%);
        transition: transform 0.28s ease;
        z-index: 999;
        display: block;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0;
    }

    .nav-list li {
        margin: 0;
        border-top: 1px solid rgba(255,255,255,0.05);
    }

    .nav-list a {
        display: block;
        padding: 0.9rem 1.25rem;
        color: white;
    }

    /* Dropdowns become collapsible sections on mobile */
    .dropdown-menu {
        position: static;
        background: rgba(255,255,255,0.98);
        box-shadow: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .dropdown.open .dropdown-menu {
        max-height: 400px; /* enough to show items; will scroll if needed */
        overflow: auto;
    }

    .dropdown-menu a {
        color: #333;
        padding-left: 1.5rem;
    }

    /* Prevent body scroll when nav open */
    body.nav-open {
        overflow: hidden;
    }

    /* Hamburger -> X animation */
    .nav-toggle.open span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.open span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Make sure dropdown indicator aligns to the right on mobile */
    .dropdown > .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(44, 85, 48, 0.7), rgba(30, 58, 46, 0.7)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%234CAF50;stop-opacity:1" /><stop offset="100%" style="stop-color:%232E7D32;stop-opacity:1" /></linearGradient></defs><rect width="1200" height="800" fill="url(%23bg)"/></svg>') center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    background: rgba(255,255,255,0.9);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-box input {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-btn {
    background: #2c5530;
    color: white;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #1e3a2e;
}

/* Main Content */
.main-content {
    margin-top: 80px;
}

/* Small SEO intro paragraphs added dynamically by server-side templates */
.seo-intro {
    color: #444;
    font-size: 0.98rem;
    margin-top: 0.75rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c5530;
}

/* Prayer Times */
.prayer-times {
    background: linear-gradient(135deg, #2c5530 0%, #1e3a2e 100%);
    color: white;
}

.prayer-times h2 {
    color: white;
}

.prayer-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.prayer-time-card {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.prayer-time-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.prayer-time {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
}

/* Prayer Cards */
.prayers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.prayer-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prayer-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.prayer-image {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(45deg, #4CAF50, #2E7D32);
    display: flex;
    align-items: center;
    justify-content: center;
}

.prayer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.prayer-card:hover .prayer-image img {
    transform: scale(1.05);
}

.prayer-content {
    padding: 2rem;
}

.prayer-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c5530;
}

.prayer-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.read-more {
    background: #2c5530;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s ease;
    display: inline-block;
}

.read-more:hover {
    background: #1e3a2e;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 3rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c5530;
}

.category-content {
    padding: 0 1rem;
}

.category-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    flex: 1;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.prayer-count {
    background: linear-gradient(135deg, #e8f5e8, #d4eed4);
    color: #2c5530;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.category-arrow {
    color: #2c5530;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.category-card-modern:hover .category-arrow {
    transform: translateX(5px);
}

/* Create default category images with CSS gradients */
.category-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Specific category background patterns */
.category-card-modern[href*="gunluk-dualar"] .category-image::before {
    background: linear-gradient(45deg, #ff9a56, #ffad85);
}

.category-card-modern[href*="namaz-dualari"] .category-image::before {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.category-card-modern[href*="korunma-dualari"] .category-image::before {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.category-card-modern[href*="saglik-dualari"] .category-image::before {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.category-card-modern[href*="bereket-dualari"] .category-image::before {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
}

.category-card-modern[href*="tovbe-dualari"] .category-image::before {
    background: linear-gradient(45deg, #fa709a, #fee140);
}

.category-card-modern[href*="aile-dualari"] .category-image::before {
    background: linear-gradient(45deg, #a8edea, #fed6e3);
}

.category-card-modern[href*="yolculuk-dualari"] .category-image::before {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
}

/* New Categories Section */
.categories-section {
    padding: 4rem 0;
    background-color: #f9fdf9;
}

.section-header {
    margin-bottom: 3rem;
}

.section-subtitle {
    color: #666;
    max-width: 700px;
    margin: 1rem auto 0;
}

.categories-flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.category-flex-item {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.category-flex-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #eee;
}

.category-flex-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #d4eed4;
}

.category-flex-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4eed4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2c5530;
    transition: all 0.3s ease;
}

.category-flex-card:hover .category-flex-icon {
    background: linear-gradient(135deg, #2c5530 0%, #1e3a2e 100%);
    color: white;
    transform: scale(1.1);
}

.category-flex-content {
    flex: 1;
}

.category-flex-content h3 {
    color: #2c5530;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.category-flex-count {
    color: #666;
    font-size: 0.9rem;
    background: #f0f8f0;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #2c5530 0%, #1e3a2e 100%);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(44,85,48,0.3);
    transform: translateY(-2px);
}

/* Fixed Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #2c5530 0%, #1e3a2e 100%);
    color: white;
    padding: 4rem 0 1rem;
    margin-top: 4rem;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3, 
.footer-section h4 {
    color: #ffd700;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: white;
    color: #2c5530;
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Placeholder Content Styling */
.content-placeholder {
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    max-width: 500px;
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.placeholder-content i {
    color: #2c5530;
    margin-bottom: 1.5rem;
}

.placeholder-content h3 {
    color: #2c5530;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.placeholder-content p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2.5rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.back-to-top:hover {
    background: #1e3a2e;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: #2c5530;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
    }
    
    .nav-list li {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .prayers-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .prayer-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 1rem;
    }
    
    .footer-links a {
        margin: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .prayer-times-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .prayers-grid {
        grid-template-columns: 1fr;
    }
    
    .prayer-card {
        margin-bottom: 1rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-flex-item {
        min-width: 100%;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        margin-top: 1rem;
    }
}
