/* Custom Styles for Istanbul Cisterns Website */

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

body {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Header Styles */
header {
    backdrop-filter: blur(10px);
    background-color: rgba(26, 42, 58, 0.95);
}

header nav a {
    position: relative;
}

header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #C6A564;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

header nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-overlay {
    background: linear-gradient(135deg, rgba(26, 42, 58, 0.9) 0%, rgba(26, 42, 58, 0.7) 100%);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Image Overlay Effect */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 42, 58, 0.8) 100%);
    z-index: 1;
}

.image-overlay img {
    transition: transform 0.5s ease;
}

.image-overlay:hover img {
    transform: scale(1.1);
}

/* Button Styles */
.btn-primary {
    background-color: #C6A564;
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #B39554;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(198, 165, 100, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    padding: 12px 32px;
    border: 2px solid white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: white;
    color: #1A2A3A;
}

/* Section Dividers */
.section-divider {
    width: 100px;
    height: 4px;
    background-color: #C6A564;
    margin: 0 auto 30px;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

/* Loading Animation */
.loading-spinner {
    border: 4px solid #E5E5E5;
    border-top: 4px solid #C6A564;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Text Gradient Effect */
.text-gradient {
    background: linear-gradient(135deg, #1A2A3A 0%, #C6A564 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #E5E5E5;
}

::-webkit-scrollbar-thumb {
    background: #C6A564;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B39554;
}

/* Responsive Image Container */
.img-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 Aspect Ratio */
    overflow: hidden;
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Quote Box */
.quote-box {
    border-left: 4px solid #C6A564;
    padding: 20px;
    background-color: #F9F9F9;
    font-style: italic;
    margin: 20px 0;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    background-color: #C6A564;
    border-radius: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 16px;
    width: 2px;
    height: calc(100% + 14px);
    background-color: #E5E5E5;
}

.timeline-item:last-child::after {
    display: none;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #C6A564;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Table Styles */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.custom-table th {
    background-color: #1A2A3A;
    color: white;
    padding: 15px;
    text-align: left;
}

.custom-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #E5E5E5;
}

.custom-table tr:hover {
    background-color: #F9F9F9;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding: 0 10px;
    color: #999;
}

.breadcrumb-item a {
    color: #1A2A3A;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #C6A564;
}

.breadcrumb-item.active {
    color: #999;
}

/* Media Queries for Mobile Optimization */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    header, footer, .fixed-cta, nav {
        display: none;
    }
}

/* Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #C6A564;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus Styles */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #C6A564;
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* ============================================
   Blog Article Content Styles
   ============================================ */

/* Blog Content Container */
.prose {
    max-width: 65ch;
    color: #374151;
    line-height: 1.75;
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Blog Article Content Specific Styles */
article .text-gray-700 {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

/* Headings in Blog Content */
article .text-gray-700 h1,
article .text-gray-700 h2,
article .text-gray-700 h3,
article .text-gray-700 h4,
article .text-gray-700 h5,
article .text-gray-700 h6 {
    font-weight: 700;
    color: #1A2A3A;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

article .text-gray-700 h1 {
    font-size: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #C6A564;
    padding-bottom: 0.75rem;
}

article .text-gray-700 h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    border-bottom: 2px solid #C6A564;
    padding-bottom: 0.5rem;
}

article .text-gray-700 h3 {
    font-size: 1.75rem;
    margin-top: 2rem;
}

article .text-gray-700 h4 {
    font-size: 1.5rem;
    margin-top: 1.75rem;
}

article .text-gray-700 h5 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

article .text-gray-700 h6 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
}

/* Paragraphs */
article .text-gray-700 p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* First paragraph special styling (Drop Cap) */
article .text-gray-700 > p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    float: left;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
    color: #C6A564;
    font-family: Georgia, serif;
}

/* Links */
article .text-gray-700 a {
    color: #1A2A3A;
    text-decoration: underline;
    text-decoration-color: #C6A564;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

article .text-gray-700 a:hover {
    color: #C6A564;
    text-decoration-color: #1A2A3A;
}

/* Lists */
article .text-gray-700 ul,
article .text-gray-700 ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

article .text-gray-700 ul {
    list-style-type: disc;
}

article .text-gray-700 ol {
    list-style-type: decimal;
}

article .text-gray-700 li {
    margin-bottom: 0.75rem;
    line-height: 1.75;
}

article .text-gray-700 li::marker {
    color: #C6A564;
    font-weight: 600;
}

article .text-gray-700 ul ul,
article .text-gray-700 ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
article .text-gray-700 blockquote {
    border-left: 4px solid #C6A564;
    padding: 1.5rem;
    margin: 2rem 0;
    background: #F9FAFB;
    font-style: italic;
    color: #4B5563;
    border-radius: 0 0.5rem 0.5rem 0;
}

article .text-gray-700 blockquote p {
    margin-bottom: 0.5rem;
}

article .text-gray-700 blockquote p:last-child {
    margin-bottom: 0;
}

article .text-gray-700 blockquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: #1A2A3A;
    font-size: 0.95rem;
}

/* Images */
article .text-gray-700 img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: block;
}

article .text-gray-700 figure {
    margin: 2rem 0;
}

article .text-gray-700 figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #6B7280;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Code Blocks */
article .text-gray-700 code {
    background: #F3F4F6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: #DC2626;
    font-family: 'Courier New', Consolas, Monaco, monospace;
}

article .text-gray-700 pre {
    background: #1F2937;
    color: #F9FAFB;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

article .text-gray-700 pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.95rem;
}

/* Tables */
article .text-gray-700 table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

article .text-gray-700 table thead {
    background: #1A2A3A;
    color: white;
}

article .text-gray-700 table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

article .text-gray-700 table td {
    padding: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

article .text-gray-700 table tbody tr:hover {
    background: #F9FAFB;
}

article .text-gray-700 table tbody tr:last-child td {
    border-bottom: none;
}

/* Horizontal Rules */
article .text-gray-700 hr {
    border: none;
    border-top: 2px solid #E5E7EB;
    margin: 3rem 0;
}

/* Strong & Emphasis */
article .text-gray-700 strong,
article .text-gray-700 b {
    font-weight: 700;
    color: #1A2A3A;
}

article .text-gray-700 em,
article .text-gray-700 i {
    font-style: italic;
}

/* Highlighted Text */
article .text-gray-700 mark {
    background: #FEF3C7;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

/* Abbreviations */
article .text-gray-700 abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* Keyboard Input */
article .text-gray-700 kbd {
    background: #374151;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

/* Video & iframe containers */
article .text-gray-700 iframe,
article .text-gray-700 video {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

/* Definition Lists */
article .text-gray-700 dl {
    margin-bottom: 1.5rem;
}

article .text-gray-700 dt {
    font-weight: 700;
    color: #1A2A3A;
    margin-top: 1rem;
}

article .text-gray-700 dd {
    margin-left: 2rem;
    margin-bottom: 0.5rem;
}

/* Callout Boxes */
article .text-gray-700 .callout,
article .text-gray-700 .note,
article .text-gray-700 .warning {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

article .text-gray-700 .callout {
    background: #EFF6FF;
    border-color: #3B82F6;
}

article .text-gray-700 .note {
    background: #F0FDF4;
    border-color: #22C55E;
}

article .text-gray-700 .warning {
    background: #FEF3C7;
    border-color: #F59E0B;
}

/* Responsive Typography */
@media (max-width: 768px) {
    article .text-gray-700 {
        font-size: 1rem;
    }
    
    article .text-gray-700 h1 {
        font-size: 2rem;
    }
    
    article .text-gray-700 h2 {
        font-size: 1.75rem;
    }
    
    article .text-gray-700 h3 {
        font-size: 1.5rem;
    }
    
    article .text-gray-700 h4 {
        font-size: 1.25rem;
    }
    
    article .text-gray-700 h5 {
        font-size: 1.125rem;
    }
    
    article .text-gray-700 > p:first-of-type::first-letter {
        font-size: 2.5rem;
    }
    
    article .text-gray-700 pre {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

/* Print Styles for Blog Content */
@media print {
    article .text-gray-700 {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    article .text-gray-700 h1 {
        page-break-after: avoid;
    }
    
    article .text-gray-700 h2,
    article .text-gray-700 h3,
    article .text-gray-700 h4 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    article .text-gray-700 img {
        page-break-inside: avoid;
    }
}
