/*
Theme Name: CoolDigital Pro
Theme URI: https://cooldigital.photography
Author: CoolDigital Photography
Author URI: https://cooldigital.photography
Description: A world-class photography blog theme with stunning visual layouts, masonry grids, and immersive galleries
Version: 1.0
License: GPL v2 or later
Text Domain: cooldigital-pro
*/

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

:root {
    --primary-color: #000;
    --accent-color: #ff6b6b;
    --text-light: #666;
    --text-dark: #222;
    --bg-light: #fafafa;
    --bg-dark: #111;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Modern Hero Section Styles */
.hero-section-modern {
    margin-top: 80px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px 0 0;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Featured Post Card */
.hero-featured {
    animation: fadeInUp 0.8s ease;
}

.featured-post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.featured-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
}

.featured-image-wrapper {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}

.featured-post-card:hover .featured-image {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
}

.featured-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.featured-content-box {
    padding: 30px;
}

.featured-category {
    margin-bottom: 15px;
}

.featured-category a {
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.featured-category a:hover {
    color: #764ba2;
}

.featured-title {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-title a {
    background: linear-gradient(to right, #333, #333);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.3s ease;
}

.featured-title a:hover {
    background-size: 100% 2px;
}

.featured-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #999;
    font-size: 13px;
}

.meta-separator {
    color: #ddd;
}

/* Right Grid Section */
.hero-grid {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    animation: fadeInRight 0.8s ease;
}

.grid-title {
    font-size: 20px;
    margin-bottom: 25px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.grid-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, #667eea, #764ba2);
    border-radius: 2px;
}

.hero-grid-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grid-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.grid-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

.grid-item-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.grid-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-item:hover .grid-thumbnail {
    transform: scale(1.1);
}

.grid-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.grid-item-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.grid-item-title a {
    color: #333;
}

.grid-item-title a:hover {
    color: #667eea;
}

.grid-item-date {
    color: #999;
    font-size: 12px;
}

/* Stats Bar */
.hero-stats-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-top: 40px;
    padding: 30px 0;
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
    animation: countUp 1s ease;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-grid {
        max-width: 600px;
        margin: 0 auto;
    }

    .stats-container {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-item {
        flex: 1 1 45%;
    }
}

@media (max-width: 768px) {
    .hero-section-modern {
        margin-top: 70px;
        padding: 20px 0 0;
    }

    .hero-container {
        padding: 0 20px;
    }

    .featured-image-wrapper {
        height: 250px;
    }

    .featured-title {
        font-size: 22px;
    }

    .hero-grid {
        padding: 20px;
    }

    .grid-item {
        padding: 10px;
    }

    .grid-item-image {
        width: 60px;
        height: 60px;
    }

    .stat-number {
        font-size: 28px;
    }
}

/* Header Styles - Keeping original but adjusting for new hero */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.site-header.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.98);
}

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

.site-branding h1 {
    font-size: 1.75rem;
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.site-branding .tagline {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    margin-top: 80px;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 100%;
    width: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

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

.hero-content {
    position: absolute;
    bottom: 80px;
    left: 60px;
    color: white;
    z-index: 10;
    max-width: 600px;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .hero-meta {
    font-size: 1rem;
    opacity: 0.9;
}

/* Masonry Grid Layout */
.masonry-container {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-grid {
    column-count: 3;
    column-gap: 2rem;
    row-gap: 2rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
    transform: translateY(0);
}

.masonry-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.masonry-overlay .post-meta {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Featured Posts Section */
.featured-posts {
    background: var(--bg-light);
    padding: 4rem 0;
}

.featured-header {
    text-align: center;
    margin-bottom: 3rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

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

.featured-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

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

.featured-content {
    padding: 1.5rem;
}

.featured-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* Single Post Styles */
.single-post-header {
    margin-top: 80px;
    padding: 4rem 0;
    background: var(--bg-light);
    text-align: center;
}

.single-post-title {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-content {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content img {
    width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
}

.post-content p {
    margin-bottom: 1.5rem;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-widget h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 1;
    }
    
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .hero-content {
        left: 30px;
        bottom: 50px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-light);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dark);
}