/* Topkapi Palace Website Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: #555;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 1.5rem;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.content-main {
    min-width: 0; /* Prevents grid overflow */
}

.content-sidebar {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 2rem;
    z-index: 1;
}

/* Header and Navigation */
.main-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 80px;
}

.nav-brand h1 {
    color: #fff;
    font-size: 1.8rem;
    margin: 0;
}

.brand-subtitle {
    color: #bdc3c7;
    font-size: 0.9rem;
    font-weight: 300;
}

.brand-link {
    text-decoration: none;
    color: inherit;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #f39c12;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f39c12;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.6);
    color: #fff;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    color: #f39c12;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7), 1px 1px 3px rgba(0,0,0,1);
    padding: 15px 20px;
    border-radius: 8px;
    backdrop-filter: blur(2px);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #f39c12;
    color: #fff;
    border-color: #f39c12;
}

.btn-primary:hover {
    background: #e67e22;
    border-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #2c3e50;
}

.btn-outline {
    background: transparent;
    color: #f39c12;
    border-color: #f39c12;
}

.btn-outline:hover {
    background: #f39c12;
    color: #fff;
}

.full-width {
    width: 100%;
}

/* Quick Facts Section */
.quick-facts {
    padding: 4rem 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.fact-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-5px);
}

.fact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fact-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Site Announcements */
.site-announcements {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0;
    overflow: hidden;
}

.announcement-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.announcement {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.announcement h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.announcement p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.95;
    color: #fff;
}

.announcement a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.announcement a:hover {
    opacity: 0.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .announcement-container {
        padding: 0.75rem 1rem;
    }
    
    .announcement h3 {
        font-size: 1rem;
    }
    
    .announcement p {
        font-size: 0.85rem;
    }
}

/* Main Content Sections */
.main-content {
    padding: 3rem 0;
}

.palace-overview {
    background: #fff;
    border-radius: 8px;
    padding: 0;
}

.highlight-box {
    background: #f8f9fa;
    border-left: 4px solid #f39c12;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.highlight-box h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.visitor-tip {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.visitor-tip h4 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.travel-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.feature-list {
    list-style: none;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.feature-list li:last-child {
    border-bottom: none;
}

/* Sidebar Widgets */
.widget {
    margin-bottom: 2rem;
}

.widget h3 {
    color: #2c3e50;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.quick-info .info-item {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

/* Mini Products in Sidebar */
.mini-products {
    margin-bottom: 1rem;
}

.mini-product {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.mini-product:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mini-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.mini-product-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.mini-product-info p {
    font-weight: 600;
    color: #f39c12;
    margin: 0;
}

.mini-product a {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 1rem;
}

/* Product Cards */
.featured-products {
    padding: 4rem 0;
    background: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    margin-bottom: 0.5rem;
}

.product-title a {
    text-decoration: none;
    color: #2c3e50;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price {
    font-weight: 600;
    color: #f39c12;
    font-size: 1.1rem;
}

.product-rating {
    color: #ffd700;
    font-size: 0.9rem;
}

.product-button {
    display: block;
    width: 100%;
    text-align: center;
    background: #f39c12;
    color: #fff;
    padding: 0.75rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.product-button:hover {
    background: #e67e22;
}

/* Inline Products */
.inline-product {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8f4fd;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 4px solid #74b9ff;
}

.product-icon {
    font-size: 1.2rem;
}

.affiliate-link {
    color: #0984e3;
    text-decoration: none;
    font-weight: 600;
}

.affiliate-link:hover {
    text-decoration: underline;
}

/* Location Section */
.location-section {
    padding: 4rem 0;
    background: #fff;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.location-info ul {
    margin: 1rem 0;
}

.location-info li {
    margin-bottom: 0.5rem;
}

.map-placeholder {
    background: #f8f9fa;
    height: 300px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    padding: 2rem;
    text-align: center;
}

.location-map iframe {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: #bdc3c7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: #ffffff;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #ffffff;
}

.footer-container a,
.footer-section a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-container a:visited,
.footer-section a:visited {
    color: #ffffff;
}

.footer-container a:hover,
.footer-section a:hover {
    color: #f39c12;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-info a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:visited,
.footer-info a:visited {
    color: #ffffff;
}

.footer-links a:hover,
.footer-info a:hover {
    color: #f39c12;
}

.footer-info {
    list-style: none;
}

.footer-info li {
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #ffffff;
}

.footer-bottom p {
    color: #ffffff;
}

.affiliate-disclosure {
    font-size: 0.8rem;
    color: #ffffff;
    margin-top: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #0984e3;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}

.header-content h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.header-content .lead {
    color: #bdc3c7;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        order: -1;
        position: static !important;
        z-index: auto;
        margin-bottom: 2rem;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: #1e3c72;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        z-index: 999;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        pointer-events: none;
    }

    .nav-menu.active {
        left: 0;
        pointer-events: all;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .facts-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 50vh;
        min-height: 400px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-container {
        padding: 0 15px;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .cta-section,
    .featured-products,
    .nav-toggle,
    .product-button {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero {
        height: auto;
        page-break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-secondary {
        background: #fff;
        border-color: #000;
        color: #000;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: #0066cc;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.3s;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    white-space: nowrap;
}

.skip-to-content:focus {
    top: 0;
    clip: auto;
    outline: 3px solid #f39c12;
    outline-offset: 2px;
}

/* Visually hidden but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* High contrast for links */
a {
    color: #0066cc;
    text-decoration: underline;
}

a:hover {
    color: #004a99;
    text-decoration: underline;
}

/* Navigation focus improvements */
.nav-link:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: 3px solid #f39c12;
    outline-offset: 2px;
}

.nav-toggle:focus {
    outline: 3px solid #f39c12;
    outline-offset: 2px;
}

/* Button focus improvements */
.btn:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}

.btn-primary:focus-visible {
    outline-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.25);
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f39c12;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Legal Pages (Privacy & Terms) */
.legal-page {
    padding: 3rem 0;
    background: #f8f9fa;
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.legal-content h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #f39c12;
}

.last-updated {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 2rem;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 4px;
}

.legal-text h2 {
    color: #34495e;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.legal-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #555;
}

.legal-text ul, .legal-text ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
    color: #555;
}

@media (max-width: 768px) {
    .legal-content {
        padding: 2rem 1rem;
    }
    
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .legal-text h2 {
        font-size: 1.25rem;
    }
}
