/*
Theme Name: Connected and Respected Custom Templates
Description: Custom styling for front-page.php and single.php templates
Version: 1.0.0
*/

/* ===================================
   GLOBAL VARIABLES & RESET
   =================================== */

:root {
    --primary-dark: #0a0a0a;
    --accent-gold: #d4af37;
    --accent-blue: #2e5266;
    --text-light: #666666;
    --bg-cream: #faf8f5;
    --border-subtle: #e8e4df;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', sans-serif;
    background: var(--bg-cream);
    color: var(--primary-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   HOMEPAGE STYLES (front-page.php)
   =================================== */

.custom-homepage {
    margin-top: 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 3rem 4rem;
    position: relative;
    overflow: hidden;
    background: var(--bg-cream);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(46, 82, 102, 0.03) 100%);
    z-index: 0;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-gold);
    font-weight: 500;
    margin-bottom: 2rem;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

h1 strong {
    font-weight: 600;
    display: block;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 3rem;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cta-primary, .cta-secondary {
    padding: 1.2rem 3rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.4s ease;
    display: inline-block;
    border: 1px solid var(--primary-dark);
}

.cta-primary {
    background: var(--primary-dark);
    color: white;
}

.cta-primary:hover {
    background: transparent;
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cta-secondary {
    background: transparent;
    color: var(--primary-dark);
}

.cta-secondary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Video & Links Section */
.video-links-section {
    background: #ffffff;
    padding: 80px 3rem;
}

.video-links-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.featured-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 2px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.featured-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.video-thumb {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumb:hover {
    transform: translateY(-5px);
}

.video-thumb iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.subscribe-link {
    text-align: center;
    margin-top: 1.5rem;
}

.subscribe-link a {
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.subscribe-link a:hover {
    color: var(--accent-blue);
}

.quick-links h3, .recent-articles h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.quick-links {
    margin-bottom: 3rem;
}

.quick-links ul, .recent-articles ul {
    list-style: none;
    padding: 0;
}

.quick-links li, .recent-articles li {
    margin-bottom: 0.8rem;
}

.quick-links a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

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

.recent-articles a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.recent-articles a:hover {
    color: var(--accent-blue);
}

/* Quote Section */
.quote-section {
    background: var(--primary-dark);
    padding: 6rem 3rem;
    position: relative;
    overflow: hidden;
}

.quote-section::before {
    content: '"';
    position: absolute;
    top: -100px;
    left: 50px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 400px;
    color: rgba(255,255,255,0.03);
    line-height: 1;
}

.quote-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.6;
    color: white;
    margin-bottom: 2rem;
    font-style: italic;
}

.quote-author {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-gold);
}

/* Services Section */
.services {
    padding: 8rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
}

.service-card {
    padding: 3rem;
    background: white;
    border: 1px solid var(--border-subtle);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-blue);
}

.service-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.service-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-light);
}

/* Credentials Bar */
.credentials {
    background: var(--accent-blue);
    padding: 2rem 3rem;
    overflow: hidden;
}

.credentials-scroll {
    display: flex;
    gap: 4rem;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.credential-item {
    flex-shrink: 0;
    color: white;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Articles Section (Homepage) */
.articles {
    padding: 8rem 3rem;
    background: white;
}

.articles-container {
    max-width: 1400px;
    margin: 0 auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.article-card {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2rem;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-bottom-color: var(--accent-gold);
}

.article-card a {
    text-decoration: none;
    color: inherit;
}

.article-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.article-card:hover .article-title {
    color: var(--accent-blue);
}

.article-excerpt {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-light);
}

/* ===================================
   ARTICLE PAGE STYLES (single.php)
   =================================== */

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 3rem 4rem;
}

.article-header {
    margin-bottom: 4rem;
    text-align: left;
}

.article-categories {
    margin-bottom: 1.5rem;
}

.article-categories a {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-gold);
    text-decoration: none;
    margin-right: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--accent-gold);
    transition: color 0.3s ease;
}

.article-categories a:hover {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.article-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.article-meta .separator {
    margin: 0 0.5rem;
    color: var(--border-subtle);
}

.article-featured-image {
    margin-bottom: 4rem;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content Styling */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--primary-dark);
}

/* Reset Gutenberg/WordPress default spacing */
.article-content * {
    margin-top: 0;
}

.article-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 2.5rem 0 0.5rem !important;
    padding-bottom: 0 !important;
    color: var(--primary-dark);
}

.article-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 1.25rem 0 0 !important;
    padding-bottom: 0 !important;
    color: var(--primary-dark);
}

.article-content h4 {
    font-family: 'Work Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0 !important;
    padding-bottom: 0 !important;
    color: var(--primary-dark);
}

.article-content p {
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

/* Paragraph immediately before a list - remove bottom spacing */
.article-content p:has(+ ul),
.article-content p:has(+ ol) {
    margin-bottom: 0 !important;
}

/* Tighter spacing for Gutenberg blocks */
.article-content .wp-block-paragraph {
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

/* Horizontal rules */
.article-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 0.5rem 0 1.25rem auto !important;
}

.article-content a {
    color: var(--accent-blue);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-gold);
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-blue);
}

.article-content blockquote {
    border-left: 3px solid var(--accent-gold);
    padding-left: 2rem;
    margin: 1.5rem 0 2rem !important;
    font-style: italic;
    color: var(--text-light);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
}

.article-content ul, .article-content ol {
    margin: 0 0 1.25rem 0.25rem !important;
}

.article-content ul {
    list-style: none;
}

.article-content ul li {
    position: relative;
    padding-left: 1rem;
}

.article-content ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    top: 0.5em;
    color: var(--accent-gold);
    font-size: 0.9rem;
    line-height: 1;
}

.article-content li {
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    margin: 0.75rem 0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Override Divi's default heading padding */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.article-content pre {
    background: var(--primary-dark);
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.article-content code {
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Article Footer */
.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: none;
}

.article-tags {
    margin-bottom: 2rem;
}

.article-tags .tags-label {
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-right: 1rem;
}

.article-tags a {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-blue);
    text-decoration: none;
    margin-right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.article-tags a:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Article Navigation (Previous/Next) */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 0;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: none;
    line-height: 1.3;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.2;
}

.nav-link:hover {
    color: var(--accent-gold);
}

.nav-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-light);
    display: inline;
    margin: 0;
}

.nav-title {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-light);
    transition: color 0.3s ease;
    display: inline;
}

.nav-previous::before {
    content: '← ';
    color: var(--accent-gold);
}

.nav-next {
    text-align: right;
}

.nav-next::after {
    content: ' →';
    color: var(--accent-gold);
}

/* Related Articles */
.related-articles {
    margin-top: 0;
    padding: 1rem 0 1rem;
    border-top: 1px solid var(--border-subtle);
}

.related-articles h3 {
    font-family: 'Work Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0 !important;
    text-align: left;
    color: var(--text-light);
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-card {
    border: none;
    padding: 0;
    transition: all 0.3s ease;
}

.related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0;
    transition: color 0.3s ease;
}

.related-card h4 {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    margin: 0 !important;
    padding-bottom: 0 !important;
    color: var(--primary-dark);
    transition: color 0.3s ease;
    line-height: 1.4;
}

.related-card:hover h4 {
    color: var(--accent-gold);
}

.related-card p {
    display: none;
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    h1 {
        font-size: 3.5rem;
    }

    .video-links-container {
        grid-template-columns: 1fr;
    }

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

    .video-thumbnails {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .article-container {
        padding: 4rem 2rem 3rem;
    }

    .article-title {
        font-size: 2.5rem;
    }

    .article-content h2 {
        font-size: 2rem;
    }

    .article-content h3 {
        font-size: 1.6rem;
    }

    .article-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
    }

    .related-articles {
        margin-left: -2rem;
        margin-right: -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

    .cta-group {
        flex-direction: column;
    }

    .cta-primary, .cta-secondary {
        text-align: center;
    }
}
