/**
 * TIPS Press Releases - Frontend Styles
 * Version: 1.0.0
 */

/* CSS Variables */
:root {
    --tips-navy: #1a3a52;
    --tips-navy-dark: #0f2535;
    --tips-gold: #c9a227;
    --tips-gold-light: #e8c547;
    --tips-cream: #faf8f5;
    --tips-gray: #f5f3f0;
    --tips-text: #2c2c2c;
    --tips-muted: #6b6b6b;
}

/* Section Wrapper */
.tips-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 40px 120px;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--tips-cream);
}

/* Header Styles */
.tips-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.tips-header::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--tips-gold), var(--tips-gold-light));
}

.tips-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--tips-gold);
    margin-bottom: 16px;
}

.tips-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(42px, 6vw, 68px);
    font-weight: 600;
    color: var(--tips-navy);
    margin: 0 0 24px 0;
    line-height: 1.1;
    letter-spacing: -1px;
}

.tips-subtitle {
    font-size: 18px;
    font-weight: 300;
    color: var(--tips-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Stats Bar */
.tips-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 60px;
    padding: 40px;
    background: linear-gradient(135deg, var(--tips-navy) 0%, var(--tips-navy-dark) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(26, 58, 82, 0.12);
}

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

.tips-stat-num {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--tips-gold);
    line-height: 1;
    margin-bottom: 8px;
}

.tips-stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Filter Buttons */
.tips-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.tips-filter {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 28px;
    border: 1px solid rgba(26, 58, 82, 0.15);
    background: transparent;
    color: var(--tips-muted);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.tips-filter:hover {
    border-color: var(--tips-navy);
    color: var(--tips-navy);
    transform: translateY(-2px);
}

.tips-filter.active {
    background: var(--tips-navy);
    border-color: var(--tips-navy);
    color: #fff;
    box-shadow: 0 4px 20px rgba(26, 58, 82, 0.15);
}

/* Grid Layout */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

/* Card Styles */
.tips-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 58, 82, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.tips-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(26, 58, 82, 0.18);
}

.tips-card-link {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.tips-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: var(--tips-gray);
}

.tips-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Card Overlay */
.tips-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(26, 58, 82, 0.9) 100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

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

.tips-card-overlay span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Badge */
.tips-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--tips-gold);
    color: var(--tips-navy-dark);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 30px;
    z-index: 2;
}

.tips-badge.pdf {
    background: #e74c3c;
    color: #fff;
    left: auto;
    right: 20px;
}

/* Card Body */
.tips-card-body {
    padding: 28px;
}

.tips-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--tips-navy);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.tips-card-date {
    font-size: 14px;
    color: var(--tips-muted);
    margin: 0;
}

/* Featured Card */
.tips-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.tips-card.featured .tips-card-img {
    aspect-ratio: auto;
    min-height: 400px;
}

.tips-card.featured .tips-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px;
    background: linear-gradient(135deg, var(--tips-navy) 0%, var(--tips-navy-dark) 100%);
}

.tips-card.featured .tips-card-title {
    color: #fff;
    font-size: 32px;
    margin-bottom: 16px;
}

.tips-card.featured .tips-card-date {
    color: rgba(255, 255, 255, 0.7);
}

.tips-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 1.7;
    margin: 20px 0 0 0;
    font-weight: 300;
}

/* Button */
.tips-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 14px 28px;
    background: var(--tips-gold);
    color: var(--tips-navy-dark);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: fit-content;
    position: relative;
    z-index: 6;
}

.tips-btn:hover {
    background: var(--tips-gold-light);
    transform: translateX(5px);
    color: var(--tips-navy-dark);
    text-decoration: none;
}

/* Custom Link Below Card */
.tips-custom-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    text-decoration: none;
    color: var(--tips-navy);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(26, 58, 82, 0.1);
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.tips-custom-link:hover {
    background: linear-gradient(135deg, var(--tips-navy) 0%, var(--tips-navy-dark) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 58, 82, 0.2);
    text-decoration: none;
}

.tips-custom-link:focus {
    outline: 2px solid var(--tips-gold);
    outline-offset: 2px;
}

.tips-custom-link-icon {
    font-size: 16px;
    line-height: 1;
}

.tips-custom-link-text {
    flex: 1;
}

.tips-custom-link::after {
    content: '↗';
    font-size: 14px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tips-custom-link:hover::after {
    opacity: 1;
    transform: translate(3px, -3px);
}

/* Card with custom link - entire card is clickable to URL */
.tips-card.has-custom-link {
    cursor: pointer !important;
}

.tips-card.has-custom-link .tips-card-img {
    cursor: pointer !important;
}

.tips-card.has-custom-link .tips-card-body {
    cursor: pointer !important;
}

.tips-card.has-custom-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(26, 58, 82, 0.22);
}

.tips-card.has-custom-link .tips-card-overlay {
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(26, 58, 82, 0.95) 100%);
}

.tips-card.has-custom-link .tips-card-overlay span::before {
    content: '🔗 ';
}

/* Featured Card Custom Link - Different styling */
.tips-card.featured .tips-custom-link {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tips-card.featured .tips-custom-link:hover {
    background: var(--tips-gold);
    color: var(--tips-navy-dark);
    border-color: var(--tips-gold);
}

/* No Items Message */
.tips-no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    border: 2px dashed rgba(26, 58, 82, 0.2);
}

.tips-no-items p {
    color: var(--tips-muted);
    font-size: 16px;
    margin: 0;
}

/* Lightbox */
.tips-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 37, 53, 0.95);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.tips-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: tipsZoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tipsZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.tips-lightbox-inner img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tips-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.tips-lightbox-close:hover {
    background: var(--tips-gold);
    color: var(--tips-navy-dark);
}

.tips-lightbox-info {
    text-align: center;
    margin-top: 20px;
    color: #fff;
}

.tips-lightbox-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.tips-lightbox-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.tips-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.tips-lightbox-nav:hover {
    background: var(--tips-gold);
    color: var(--tips-navy-dark);
}

.tips-lightbox-prev {
    left: 20px;
}

.tips-lightbox-next {
    right: 20px;
}

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

.tips-card {
    animation: tipsFadeIn 0.6s ease-out both;
}

.tips-card:nth-child(1) { animation-delay: 0.05s; }
.tips-card:nth-child(2) { animation-delay: 0.1s; }
.tips-card:nth-child(3) { animation-delay: 0.15s; }
.tips-card:nth-child(4) { animation-delay: 0.2s; }
.tips-card:nth-child(5) { animation-delay: 0.25s; }
.tips-card:nth-child(6) { animation-delay: 0.3s; }
.tips-card:nth-child(7) { animation-delay: 0.35s; }
.tips-card:nth-child(8) { animation-delay: 0.4s; }
.tips-card:nth-child(9) { animation-delay: 0.45s; }
.tips-card:nth-child(10) { animation-delay: 0.5s; }
.tips-card:nth-child(11) { animation-delay: 0.55s; }
.tips-card:nth-child(12) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 1024px) {
    .tips-card.featured {
        grid-column: span 1;
        display: block;
    }

    .tips-card.featured .tips-card-img {
        aspect-ratio: 16/9;
        min-height: auto;
    }

    .tips-card.featured .tips-card-body {
        padding: 30px;
    }

    .tips-card.featured .tips-card-title {
        font-size: 24px;
    }

    .tips-stats {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .tips-section {
        padding: 60px 20px 80px;
    }

    .tips-header {
        margin-bottom: 50px;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tips-stats {
        flex-direction: column;
        gap: 24px;
        padding: 30px;
    }

    .tips-stat-num {
        font-size: 36px;
    }

    .tips-filters {
        gap: 8px;
        margin-bottom: 40px;
    }

    .tips-filter {
        padding: 10px 20px;
        font-size: 13px;
    }

    .tips-card-body {
        padding: 20px;
    }

    .tips-lightbox {
        padding: 20px;
    }

    .tips-lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .tips-lightbox-prev {
        left: 10px;
    }

    .tips-lightbox-next {
        right: 10px;
    }

    .tips-lightbox-close {
        top: 10px;
        right: 10px;
    }
}

/* Print Styles */
@media print {
    .tips-lightbox,
    .tips-filters {
        display: none !important;
    }

    .tips-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility - Focus States */
.tips-filter:focus,
.tips-btn:focus,
.tips-lightbox-close:focus,
.tips-lightbox-nav:focus {
    outline: 2px solid var(--tips-gold);
    outline-offset: 2px;
}

.tips-card:focus-within {
    outline: 2px solid var(--tips-gold);
    outline-offset: 4px;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .tips-card,
    .tips-card-img img,
    .tips-card-overlay,
    .tips-filter,
    .tips-btn,
    .tips-lightbox-inner {
        animation: none;
        transition: none;
    }
}
