/*
Theme Name: Rallie
Theme URI: https://rallie.pro
Author: Kobestarr Digital
Author URI: https://kobestarr.io
Description: Professional networking platform for padel events. Content-first theme with DM Serif Display, DM Sans, and DM Mono typography. Built by Kobestarr Digital.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
License URI: https://rallie.pro
Text Domain: rallie
Tags: one-column, custom-menu, featured-images, full-width-template

Keep the rally going.
*/

/* ============================================================
   BRAND VARIABLES
   ============================================================ */

:root {
    --rallie-dark: #1A1F2E;
    --rallie-amber: #E8A44A;
    --rallie-white: #F4F1EC;
    --rallie-teal: #2D7D72;
    --rallie-red: #C0392B;
    --rallie-gradient: linear-gradient(135deg, #1A1F2E 0%, #2D3748 50%, #1A1F2E 100%);
}

/* ============================================================
   RESET + BASE
   ============================================================ */

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

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--rallie-dark);
    background: var(--rallie-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--rallie-teal);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease-out;
}

a:hover {
    color: var(--rallie-amber);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: var(--rallie-dark);
    padding: 1rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-header__logo {
    height: 2.75rem;
    width: auto;
    display: block;
}

.site-header__brand:hover {
    opacity: 0.85;
}

.site-header__nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.site-header__nav a {
    color: var(--rallie-white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s ease-out;
}

.site-header__nav a:hover {
    opacity: 1;
    color: var(--rallie-amber);
}

/* Mobile nav */
@media (max-width: 640px) {
    .site-header__nav {
        gap: 1rem;
    }

    .site-header__nav a {
        font-size: 0.8125rem;
    }
}

/* ============================================================
   ARTICLE / CONTENT TYPOGRAPHY
   ============================================================ */

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(26, 31, 46, 0.1);
}

.article-header__title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--rallie-dark);
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .article-header__title {
        font-size: 2.5rem;
    }
}

.article-meta {
    font-size: 0.8125rem;
    color: rgba(26, 31, 46, 0.5);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.article-meta a {
    color: rgba(26, 31, 46, 0.6);
}

.article-featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

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

/* Content styles */
.article-content h2 {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;
    margin: 2.5rem 0 1rem;
    color: var(--rallie-dark);
}

.article-content h3 {
    font-family: "DM Sans", sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 2rem 0 0.75rem;
    color: var(--rallie-dark);
}

.article-content h4 {
    font-family: "DM Sans", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 1.5rem 0 0.5rem;
    color: var(--rallie-dark);
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 3px solid var(--rallie-amber);
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    font-style: italic;
    color: rgba(26, 31, 46, 0.75);
    background: rgba(232, 164, 74, 0.06);
    border-radius: 0 4px 4px 0;
}

.article-content code {
    font-family: "DM Mono", monospace;
    font-size: 0.875em;
    background: rgba(26, 31, 46, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.article-content pre {
    background: var(--rallie-dark);
    color: var(--rallie-white);
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

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

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.article-content th,
.article-content td {
    text-align: left;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid rgba(26, 31, 46, 0.1);
}

.article-content th {
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(26, 31, 46, 0.6);
}

.article-content img {
    border-radius: 6px;
    margin: 1.5rem 0;
}

.article-content hr {
    border: none;
    border-top: 1px solid rgba(26, 31, 46, 0.1);
    margin: 2.5rem 0;
}

/* WordPress specific */
.article-content .wp-block-image {
    margin: 1.5rem 0;
}

.article-content .aligncenter {
    text-align: center;
}

.article-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.article-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.wp-caption-text {
    font-size: 0.8125rem;
    color: rgba(26, 31, 46, 0.5);
    margin-top: 0.5rem;
    text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--rallie-dark);
    padding: 2rem 1.25rem;
    text-align: center;
}

.site-footer__inner {
    max-width: 720px;
    margin: 0 auto;
}

.site-footer__tagline {
    font-family: "DM Serif Display", Georgia, serif;
    color: var(--rallie-amber);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.site-footer__nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    margin-bottom: 1rem;
}

.site-footer__nav a {
    color: var(--rallie-white);
    text-decoration: none;
    font-size: 0.8125rem;
    opacity: 0.6;
    transition: opacity 0.2s ease-out;
}

.site-footer__nav a:hover {
    opacity: 1;
}

.site-footer__copy {
    font-size: 0.75rem;
    color: rgba(244, 241, 236, 0.3);
}

/* ============================================================
   ARCHIVE / INDEX
   ============================================================ */

.archive-title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--rallie-dark);
}

.post-card {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(26, 31, 46, 0.08);
}

.post-card__image {
    display: block;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card__title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.post-card__title a {
    color: var(--rallie-dark);
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--rallie-teal);
}

.post-card__meta {
    font-size: 0.8125rem;
    color: rgba(26, 31, 46, 0.45);
    margin-bottom: 0.75rem;
}

.post-card__excerpt {
    color: rgba(26, 31, 46, 0.7);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.post-card__read-more {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rallie-teal);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.pagination a {
    color: var(--rallie-dark);
    background: rgba(26, 31, 46, 0.05);
}

.pagination a:hover {
    background: rgba(26, 31, 46, 0.1);
    color: var(--rallie-dark);
}

.pagination .current {
    background: var(--rallie-teal);
    color: var(--rallie-white);
}

/* ============================================================
   UTILITY
   ============================================================ */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

::selection {
    background: rgba(232, 164, 74, 0.3);
    color: var(--rallie-dark);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================
   HOMEPAGE
   ============================================================ */

.home-hero {
    text-align: center;
    padding: 4rem 1.25rem 3rem;
    max-width: 720px;
    margin: 0 auto;
}

.home-hero__headline {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--rallie-dark);
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .home-hero__headline {
        font-size: 3rem;
    }
}

.home-hero__tagline {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.25rem;
    color: var(--rallie-amber);
    margin-bottom: 1.25rem;
    font-weight: 400;
}

.home-hero__description {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(26, 31, 46, 0.7);
    max-width: 560px;
    margin: 0 auto 2rem;
}

.home-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn-primary {
    display: inline-block;
    background: var(--rallie-amber);
    color: var(--rallie-dark);
    padding: 0.875rem 1.75rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease-out, transform 0.2s ease-out;
}

.btn-primary:hover {
    background: #d4923e;
    color: var(--rallie-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--rallie-teal);
    padding: 0.875rem 1.75rem;
    border: 2px solid var(--rallie-teal);
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease-out, color 0.2s ease-out;
}

.btn-secondary:hover {
    background: var(--rallie-teal);
    color: var(--rallie-white);
}

/* Home sections */
.home-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

.home-section__heading {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--rallie-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Guide cards */
.guide-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .guide-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.guide-card {
    background: var(--rallie-white);
    border: 1px solid rgba(26, 31, 46, 0.08);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
}

.guide-card:hover {
    border-color: var(--rallie-amber);
    box-shadow: 0 4px 16px rgba(26, 31, 46, 0.06);
}

.guide-card__title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--rallie-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.guide-card__excerpt {
    font-size: 0.875rem;
    color: rgba(26, 31, 46, 0.6);
    line-height: 1.6;
    flex: 1;
}

.guide-card__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rallie-teal);
    margin-top: 0.75rem;
    text-decoration: none;
}

/* Blog preview cards on homepage */
.blog-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .blog-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    border: 1px solid rgba(26, 31, 46, 0.08);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--rallie-amber);
    box-shadow: 0 4px 16px rgba(26, 31, 46, 0.06);
}

.blog-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(26, 31, 46, 0.04);
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--rallie-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.blog-card__date {
    font-size: 0.75rem;
    color: rgba(26, 31, 46, 0.4);
    margin-bottom: 0.5rem;
}

.blog-card__excerpt {
    font-size: 0.875rem;
    color: rgba(26, 31, 46, 0.6);
    line-height: 1.6;
    flex: 1;
}

/* Bottom CTA */
.home-cta {
    text-align: center;
    background: var(--rallie-dark);
    padding: 3.5rem 1.25rem;
    border-radius: 12px;
    max-width: 960px;
    margin: 0 auto 3rem;
}

.home-cta__heading {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--rallie-white);
    margin-bottom: 0.75rem;
}

.home-cta__description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(244, 241, 236, 0.7);
    max-width: 520px;
    margin: 0 auto 1.75rem;
}

.home-cta .btn-primary {
    color: var(--rallie-dark);
}

/* Homepage uses full width, not the narrow 720px */
.home .site-main {
    max-width: none;
    padding: 0;
}
