:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #2c3e50;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    padding-top: 60px;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navbar Stilleri */
.navbar {
    background-color: var(--card-background);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Ana İçerik Stilleri */
main {
    margin-top: 70px;
}

section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* Hero Bölümü */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/static/images/optimized/villa1.webp');
    background-size: cover;
    background-position: center;
    color: white;
}
.hero-slider img, .gallery-slider img {
    z-index: 1;
    position: relative;
}
.gallery-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

.gallery-slider {
    display: flex;
    width: 100%;
    height: 100%;
    user-select: none;
    touch-action: pan-y pinch-zoom;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-number {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}

.slider-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.slider-button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.slider-button.prev {
    left: 20px;
}

.slider-button.next {
    right: 20px;
}

@media (max-width: 768px) {
    .slider-button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .slider-button.prev {
        left: 10px;
    }
    
    .slider-button.next {
        right: 10px;
    }
}

/* Özellikler ve Konum Kartları */
.features-grid, .location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.feature-card, .location-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover, .location-card:hover {
    transform: translateY(-5px);
}

.feature-icon, .location-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* İletişim Bölümü */
.contact-info {
    text-align: center;
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-info p {
    margin: 1rem 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--primary-color);
    color: white;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary-color);
}

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

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-container {
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        margin-top: 1rem;
        border-top: 1px solid #eee;
        padding-top: 1rem;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav-links a {
        margin: 10px 0;
        display: block;
        margin-left: 0;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
}

/* Takvim Bölümü */
.calendar {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar h2 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Takvim Container */
.calendar-container {
    padding: 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.calendar-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.status-icon {
    margin-right: 10px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
}

.status-unavailable {
    background-color: #f44336;
    position: relative;
}
.availability-section {
    flex: 1 1 auto;
    min-width: 280px;
    max-width: 400px;
    margin: 0 !important;
}

.availability-info {
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    height: 100%;
}

.availability-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.availability-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-size: 14px;
    font-weight: 500;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
    position: relative;
    z-index: 2;
}

.whatsapp-button, .phone-button {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.whatsapp-button {
    background: #25D366;
    color: white;
    width: auto;
    margin-top: 0;
}

.phone-button {
    background: #007AFF;
    color: white;
}

.whatsapp-icon, .phone-button svg {
    width: 18px;
    height: 18px;
}

.ministry-badge {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.ministry-badge img {
    max-width: 150px;
    height: auto;
}

.calendar-note {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    font-size: 0.9em;
    line-height: 1.6;
}

.calendar-note strong {
    color: var(--primary-color);
}

/* Mobil cihazlar için medya sorguları */
@media (max-width: 768px) {
    .calendar-content {
        flex-direction: column;
        align-items: center;
    }

    .calendar-container {
        padding: 5px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .availability-section {
        width: 100%;
        margin: 10px 0 !important;
    }
    
    .contact-buttons {
        padding: 0 10px;
    }
    
    .whatsapp-button, .phone-button {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .whatsapp-icon, .phone-button svg {
        width: 16px;
        height: 16px;
    }
    
    .ministry-badge img {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 10px;
    }
    
    .availability-info {
        padding: 15px;
    }
    
    .calendar-note {
        font-size: 0.8em;
    }
}

/* Modern Takvim Stilleri (Admin Panelden) */
.calendar-container-wrapper {
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    padding: 24px;
    width: 100%;
    max-width: 480px;
    flex: 1 1 auto;
    min-width: 320px;
}

.calendar-controls {
    padding: 0 0 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-controls h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-color);
}

.nav-btn:hover {
    background: var(--background-color);
    border-color: var(--accent-color);
}

.calendar-wrapper {
    width: 100%;
}

.weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #717171;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: default;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    background: var(--card-background);
    color: var(--text-color);
}

.day-cell.empty { 
    pointer-events: none; 
    background: transparent;
}

.day-cell.unavailable { 
    background-color: #F3F4F6; 
    color: #9CA3AF; 
    text-decoration: line-through;
    cursor: not-allowed;
    pointer-events: none;
}

.day-cell.selected,
.day-cell.range-start,
.day-cell.range-end,
.day-cell.in-range {
    background-color: var(--text-color) !important;
    color: white !important;
}

.day-cell.in-range { 
    border-radius: 0; 
}

.day-cell.range-start { 
    border-radius: 75% 0 0 75%; 
}

.day-cell.range-end { 
    border-radius: 0 75% 75% 0; 
}

.day-cell.range-start.range-end { 
    border-radius: 50%; 
}

.price-tag {
    font-size: 9px;
    margin-top: 2px;
    color: #717171;
}

.day-cell.selected .price-tag,
.day-cell.range-start .price-tag,
.day-cell.range-end .price-tag,
.day-cell.in-range .price-tag {
    color: rgba(255,255,255,0.8);
}

.day-cell.unavailable .price-tag {
    text-decoration: line-through;
}

/* Mobil Uyumluluk */
@media screen and (max-width: 1200px) {
    .calendar {
        max-width: 100%;
        padding: 1rem;
    }
}

@media screen and (max-width: 992px) {
    .calendar-container {
        padding: 20px !important;
    }
}

@media screen and (max-width: 576px) {
    .calendar-container {
        padding: 15px !important;
        border-radius: 8px !important;
    }
    
    .calendar h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .calendar-container-wrapper {
        padding: 16px;
        border-radius: 16px;
    }
    
    .calendar-controls h2 {
        font-size: 14px;
    }
    
    .day-cell {
        font-size: 12px;
    }
    
    .price-tag {
        font-size: 8px;
    }
}

/* WhatsApp Buton Stili */
.whatsapp-button:hover {
    background-color: #128C7E;
}

.modern-phone-button {
    margin-top: 0;
    padding: 8px 12px;
}

.phone-number {
    font-size: 0.9em;
}

.location-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.location-distances {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.location-map {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border-radius: 10px;
    overflow: hidden;
}

.location-map iframe {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .location-container {
        grid-template-columns: 1fr;
    }
    
    .location-distances {
        grid-template-columns: 1fr;
    }
}
.ministry-badge {
    margin-top: 10px;
    display: flex;
    align-items: center;
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.ministry-badge img {
    height: 50px ;
}

.badge-text {
    font-size: 12px;
    color: #333;
}

.badge-text p {
    margin: 0;
}

.view-document {
    color: #0066cc;
    text-decoration: underline;
    font-size: 11px;
}

.view-document:hover {
    color: #003366;
}

.photo-gallery {
    padding: 2rem;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    position: relative;
}

.immersive-slider {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
    background-color: #f0f0f0; /* Placeholder color */
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* Hidden until loaded */
    transition: opacity 0.3s ease-in;
}

.slide img.loaded {
    opacity: 1;
}

/* Loading Spinner for Slider */
.immersive-slider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    border: 4px solid #ddd;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.main-photo {
    width: 100%;
    height: 500px;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 8px;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail {
    height: 150px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.2s;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.features-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .features-intro {
        padding: 0 1rem;
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    section {
        padding: 2rem 0.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Optimization for Photos and Cards */
@media (max-width: 768px) {
    /* Photo Slider Adjustment */
    .immersive-slider {
        height: 300px; /* Reduced height for mobile to prevent excessive cropping */
    }
    
    .gallery-container {
        padding: 0.5rem;
    }

    /* Feature and Location Cards Compact View */
    .features-grid, .location-grid {
        gap: 1rem;
        padding: 0.5rem;
    }

    .feature-card, .location-card {
        padding: 1.2rem; /* Reduced padding */
    }

    .feature-icon, .location-icon {
        font-size: 2rem; /* Smaller icons */
        margin-bottom: 0.8rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .feature-card p, .location-card p {
        font-size: 0.9rem;
    }

    /* Location Map Adjustment */
    .location-map {
        min-height: 300px; /* Reduced map height */
    }
    
    .location-container {
        margin-top: 1rem;
        gap: 1rem;
    }
}

/* Rules Page Styles */
.rules-section {
    padding: 4rem 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.rules-intro {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

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

.rule-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.rule-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.rule-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.rule-card p, .rule-card li {
    color: var(--text-color);
    line-height: 1.6;
}

.rule-card ul {
    list-style-type: none;
    padding: 0;
}

.rule-card li {
    margin-bottom: 0.5rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
}

/* Rules Link in Calendar */
.rules-link-container {
    margin-top: 15px;
    text-align: center;
}

.rules-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 1px solid #eee;
    border-radius: 20px;
    background: #fff;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.rules-link:hover {
    background: #f8f9fa;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Footer Links */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

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

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}