/*
Theme Name: St. E Premte Church
Theme URI: https://stepremte.org
Author: StEPremte Dev
Description: Custom theme for St. E Premte Albanian Orthodox Church, Cleveland OH. Black and red Albanian identity theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: stepremte
Tags: church, orthodox, albanian, black, red, bilingual, accessible, responsive
*/

/* === CSS Custom Properties === */
:root {
    --color-black: #0a0a0a;
    --color-charcoal: #1a1a1a;
    --color-dark-gray: #2d2d2d;
    --color-medium-gray: #555555;
    --color-light-gray: #f5f5f5;
    --color-white: #ffffff;
    --color-red: #E41E20;
    --color-red-dark: #B91618;
    --color-red-light: #FF3B3D;
    --color-gold: #C5A253;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1200px;
    --header-height: 80px;
    --transition: 0.3s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-charcoal);
    background: var(--color-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover, a:focus {
    color: var(--color-red-dark);
    text-decoration: underline;
}

a:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-black);
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1em;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* === Skip Link === */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--color-red);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
    color: var(--color-white);
    text-decoration: none;
}

/* === Header === */
.site-header {
    background: var(--color-black);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-top {
    background: var(--color-red);
    padding: 0.25rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-white);
}

.header-top a {
    color: var(--color-white);
    font-weight: 500;
}

.header-top a:hover {
    color: var(--color-light-gray);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.site-branding:hover {
    text-decoration: none;
}

.site-logo img {
    height: 55px;
    width: auto;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-white);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.site-subtitle {
    font-size: 0.75rem;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
}

/* === Navigation === */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: var(--color-white);
    padding: 0.75rem 1rem;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    border-bottom: 3px solid transparent;
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav .current-menu-item > a,
.main-nav .current-page-ancestor > a {
    color: var(--color-red);
    border-bottom-color: var(--color-red);
    text-decoration: none;
}

/* Dropdown */
.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-charcoal);
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 100;
    border-top: 3px solid var(--color-red);
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
    display: block;
}

.main-nav .sub-menu a {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-nav .sub-menu a:hover {
    background: var(--color-red);
    color: var(--color-white);
    border-bottom-color: transparent;
}

/* Language Switcher in nav */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 1rem;
}

.lang-switcher a {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    text-decoration: none;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: var(--color-white);
    background: var(--color-red);
    text-decoration: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-white);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-dark-gray) 100%);
    color: var(--color-white);
    text-align: center;
    padding: 5rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M50 10 L55 40 L85 45 L60 55 L65 85 L50 65 L35 85 L40 55 L15 45 L45 40Z" fill="none" stroke="rgba(228,30,32,0.05)" stroke-width="1"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero .cross-icon {
    font-size: 3rem;
    color: var(--color-red);
    margin-bottom: 1rem;
    display: block;
}

.hero h1 {
    color: var(--color-white);
    font-size: 3rem;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-style: italic;
}

.hero .founded {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
}

.hero .service-info {
    background: rgba(228,30,32,0.15);
    border: 1px solid var(--color-red);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    display: inline-block;
    margin-bottom: 2rem;
}

.hero .service-info h3 {
    color: var(--color-red);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.hero .service-info p {
    color: var(--color-white);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn:hover, .btn:focus {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--color-red);
    color: var(--color-white);
    border-color: var(--color-red);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--color-red-dark);
    color: var(--color-white);
    border-color: var(--color-red-dark);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover, .btn-outline:focus {
    background: var(--color-white);
    color: var(--color-black);
}

/* === Sections === */
.section {
    padding: 4rem 0;
}

.section-dark {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.section-dark h2,
.section-dark h3 {
    color: var(--color-white);
}

.section-light {
    background: var(--color-light-gray);
}

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

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-red);
}

.section-header p {
    color: var(--color-medium-gray);
    font-size: 1.1rem;
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-dark .section-header p {
    color: rgba(255,255,255,0.7);
}

/* === Card Grid === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-body .date {
    color: var(--color-red);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-body p {
    color: var(--color-medium-gray);
    font-size: 0.95rem;
}

/* === Gallery Grid === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background var(--transition);
}

.gallery-item:hover::after {
    background: rgba(0,0,0,0.2);
}

/* === Contact Section === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    color: var(--color-red);
    margin-bottom: 1rem;
}

.contact-detail {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.contact-detail .icon {
    color: var(--color-red);
    font-size: 1.2rem;
    min-width: 24px;
}

.contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: 0;
}

/* === Newsletter Archive === */
.newsletter-list {
    list-style: none;
}

.newsletter-list li {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 0.75rem 0;
}

.newsletter-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.newsletter-list .pdf-icon {
    color: var(--color-red);
    font-size: 1.2rem;
}

/* === Page Content === */
.page-header {
    background: var(--color-black);
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    color: var(--color-white);
    margin-bottom: 0;
}

.page-header .breadcrumb {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.page-header .breadcrumb a {
    color: var(--color-gold);
}

.page-content {
    padding: 3rem 0;
}

.page-content .entry-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.page-content .entry-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

.page-content .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.page-content .entry-content table th,
.page-content .entry-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    text-align: left;
}

.page-content .entry-content table th {
    background: var(--color-black);
    color: var(--color-white);
    font-weight: 600;
}

.page-content .entry-content table tr:nth-child(even) {
    background: var(--color-light-gray);
}

/* === Clergy Card === */
.clergy-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.clergy-card img {
    width: 200px;
    border-radius: 8px;
    flex-shrink: 0;
}

.clergy-card h3 {
    color: var(--color-red);
}

/* === Footer === */
.site-footer {
    background: var(--color-black);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 0;
}

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

.footer-col h4 {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-red);
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.8;
}

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

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-col ul a:hover {
    color: var(--color-red);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.footer-bottom a {
    color: var(--color-red);
}

/* === Blog/News === */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform var(--transition);
}

.post-card:hover {
    transform: translateY(-3px);
}

.post-card .post-content {
    padding: 1.5rem;
}

.post-card .post-meta {
    color: var(--color-medium-gray);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.post-card h3 a {
    color: var(--color-black);
}

.post-card h3 a:hover {
    color: var(--color-red);
}

/* === Bilingual content indicator === */
.lang-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.lang-badge-en {
    background: var(--color-red);
    color: var(--color-white);
}

.lang-badge-sq {
    background: var(--color-black);
    color: var(--color-white);
}

/* === Lightbox === */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    padding: 0.5rem;
}

/* === Mobile Improvements === */
.page-content .entry-content .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.header-top .container {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn, a, button, input[type="submit"] {
    touch-action: manipulation;
}

/* === Responsive === */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-charcoal);
        flex-direction: column;
        padding: 1rem;
        border-top: 3px solid var(--color-red);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav .sub-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        padding-left: 1rem;
    }

    .main-nav li:hover > .sub-menu {
        display: block;
    }

    .lang-switcher {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.2);
        margin-left: 0;
        padding-left: 0;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .clergy-card {
        flex-direction: column;
    }

    .clergy-card img {
        width: 100%;
        max-width: 300px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Print === */
@media print {
    .site-header, .site-footer, .menu-toggle, .hero-actions {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* === WordPress Core Styles === */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--color-medium-gray);
    text-align: center;
    padding: 0.5rem;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--color-light-gray);
    color: var(--color-charcoal);
    font-weight: 500;
    text-decoration: none;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--color-red);
    color: var(--color-white);
}
