/* CSS Variables for colors, typography, and spacing */
:root {
    --primary-color: #0f2343;
    --primary-foreground: #ffffff;
    --accent-color: #ca8a04;
    --secondary-bg: #f3f4f6;
    --muted-color: #4b5563;
    --border-color: #e5e7eb;
    
    --font-display: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    color: var(--primary-color);
    background-color: var(--primary-foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.w-full {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #a16207;
}

.btn-secondary {
    background-color: var(--secondary-bg);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: #0f2343;
    /* border-bottom: 1px solid var(--border-color); */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-color);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
}

.site-logo-image {
    width: auto;
    max-width: 180px;
    height: 44px;
    object-fit: contain;
}

.footer-logo-image {
    width: auto;
    max-width: 160px;
    height: 48px;
    object-fit: contain;
}

.reader-logo-image {
    width: auto;
    max-width: 160px;
    height: 40px;
    object-fit: contain;
    margin: 0 auto;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: #ca8a04;
}

.logo-text p {
    font-size: 0.75rem;
    color: #ffffff;
}

.nav-menu {
    display: none;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: #dbe2f9;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: var(--secondary-bg);
}

.social-links-header {
    display: none;
    gap: 0.75rem;
    align-items: center;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-btn:hover {
    background-color: var(--secondary-bg);
}

.social-btn i, .social-links-header i {
    width: 1rem;
    height: 1rem;
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.slide.active {
    opacity: 1;
}

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

.slide-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 1rem;
}

.slide-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.slide-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.carousel-control:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.carousel-control.prev {
    left: 1rem;
}

.carousel-control.next {
    right: 1rem;
}

.carousel-pagination {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.dot.active {
    background-color: var(--accent-color);
    width: 2rem;
}

.carousel-counter {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 20;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
}

.carousel-counter .current {
    color: var(--accent-color);
}

.carousel-counter .total {
    color: rgba(255, 255, 255, 0.6);
}

/* Sections Base */
.magazines-section, .partners-section {
    padding: 4rem 0;
}

.partners-section {
    background-color: rgba(243, 244, 246, 0.3); /* secondary/30 */
}

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
}

.section-subtitle-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-subtitle-wrap.justify-center {
    justify-content: center;
}

.divider {
    height: 2px;
    width: 2rem;
    background-color: var(--accent-color);
}

.section-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    font-weight: 600;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--muted-color);
    max-width: 42rem;
}

.section-desc.centered {
    margin-left: auto;
    margin-right: auto;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Magazine Card */
.magazine-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.magazine-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-image-wrapper {
    position: relative;
    height: 16rem;
    background-color: var(--secondary-bg);
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.magazine-card:hover .card-overlay {
    opacity: 1;
}

.card-content {
    padding: 1.5rem;
}

.edition-label {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--muted-color);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc p,
.card-desc ul,
.card-desc ol,
.card-desc blockquote,
.card-desc h2,
.card-desc h3,
.card-desc h4 {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.downloads {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-color);
    font-size: 0.75rem;
}

.downloads i {
    width: 1rem;
    height: 1rem;
}

.year {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Partner Card */
.partner-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.partner-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.partner-logo {
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-bg);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.partner-logo img {
    max-height: 100%;
    object-fit: contain;
}

.partner-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.partner-desc {
    font-size: 0.875rem;
    color: var(--muted-color);
    margin-bottom: 1rem;
}

.partner-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.read-more {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
}

.read-more:hover {
    color: var(--primary-color);
}

/* Callout Box */
.callout-box {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.callout-icon {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.callout-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.callout-desc {
    color: var(--muted-color);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--primary-foreground);
    padding-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-icon {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
}

.footer-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.col-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 1rem;
}

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

.footer-links a, .footer-contact a, .footer-contact span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--accent-color);
}

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

.footer-contact i {
    color: var(--accent-color);
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-foreground);
}

.footer-social a:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.footer-social i {
    width: 1.125rem;
    height: 1.125rem;
}

/* Media Queries */
@media (min-width: 640px) {
    .logo-text {
        display: block;
    }
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .social-links-header {
        display: flex;
    }
    
    .slide-title {
        font-size: 3rem;
    }
    
    .slide-description {
        font-size: 1.25rem;
    }
    
    .carousel-control {
        padding: 0.75rem;
    }
    
    .carousel-control.prev {
        left: 2rem;
    }
    
    .carousel-control.next {
        right: 2rem;
    }
    
    .magazines-section, .partners-section {
        padding: 6rem 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .copyright {
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .slide-title {
        font-size: 3.75rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
