:root {
    --bg-color: #7a0e0e;       /* Deep red */
    --card-bg: #b91d1d;        /* VnBusiness Red for cards */
    --card-border: #e63946;    /* Brighter red for borders */
    --text-primary: #ffffff;   /* Pure white for best contrast */
    --text-secondary: #fcdbcb; /* Soft warm pink-white for secondary text */
    --gold: #ffd93b;           /* Vibrant gold */
    --gold-light: #fff0a8;     /* Lighter gold for glowing */
    --red: #8a1515;            /* Darker red variant */
    --font-heading: 'Playfair Display', serif;
    --font-content: 'Roboto', sans-serif;
    --font-size-base: 19px;
    --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-content);
    font-size: var(--font-size-base);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography & Orphan prevention */
.avoid-orphan {
    text-wrap: pretty;
}

h1, h2, h3, .stat-num {
    font-family: var(--font-heading);
    color: var(--gold);
    text-wrap: balance;
}

/* Header / Hero Section */
.hero {
    position: relative;
    width: 100%;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    overflow: hidden;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    background: rgba(80, 5, 5, 0.6);
    padding: 40px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 217, 59, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.main-title {
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--gold), var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 3s infinite alternate;
    text-wrap: nowrap; /* Prevent standard wrapping */
    display: inline-block; /* Ensure gradient works properly */
}

.title-line1 {
    font-size: 1.8rem;
    display: block;
    line-height: 1.3;
}

.title-line2 {
    font-size: 3.5rem;
    display: block;
    line-height: 1.1;
    margin-top: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* Ensure it stays readable */
}

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

.sapo {
    font-size: 1.05rem;
    color: var(--text-primary);
    max-width: 800px;
    margin: 20px auto 0;
    text-align: justify;
    line-height: 1.6;
}

/* Animations */
@keyframes titleGlow {
    0% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
    100% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.5); }
}

@keyframes drawLine {
    0% { stroke-dashoffset: 1000; }
    100% { stroke-dashoffset: 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes floatWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.line-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3s ease forwards;
}

.sun-orbit {
    transform-origin: 50% 50%;
    animation: spin 20s linear infinite;
}

.wave-path {
    animation: floatWave 6s ease-in-out infinite;
}

.path-2 {
    animation-delay: -3s;
}

/* Stats Section */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.stats-section {
    margin-bottom: 60px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    padding: 30px 0;
}

.stat-box {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.stat-num {
    display: block;
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 10px;
    color: var(--gold-light);
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 30px 25px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--red));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    z-index: 2;
}

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

.card-number {
    position: absolute;
    top: -20px;
    right: 10px;
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    transition: var(--transition);
    pointer-events: none;
}

.product-card:hover .card-number {
    color: rgba(212, 175, 55, 0.1);
    top: -10px;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 50px;
    position: relative;
    z-index: 1;
}

.ocop-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(212, 175, 55, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.ocop-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gold-light);
}

.card-reveal {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    font-size: 0.95rem; /* Base relative to 19px */
}

.card-reveal p {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.card-reveal p span {
    font-size: 0.8rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 2px;
    opacity: 0.8;
}

.cooperative {
    color: var(--text-primary);
    font-weight: 500;
}

.address {
    color: var(--text-secondary);
}

/* Animations */
.fade-in {
    animation: fadeInContainer 0.8s ease forwards;
}

@keyframes fadeInContainer {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--gold);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    padding: 50px 30px 40px;
    z-index: 2;
    transform: translateY(40px) scale(0.95);
    transition: all var(--transition);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--gold);
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    animation: spin 15s linear infinite;
}

.modal-ocop-stars {
    color: var(--gold);
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

#modal-name {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.modal-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 20px;
}

#modal-htx {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 500;
}

#modal-address {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.modal-ocop-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), #8c6a21);
    color: #fff;
    padding: 8px 25px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--card-border);
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.footer-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: -1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .title-line1 {
        font-size: 1.2rem;
    }
    
    .title-line2 {
        font-size: 2.2rem;
        text-wrap: wrap; /* Allow wrapping on very small screens if necessary */
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-box {
        margin-bottom: 20px;
    }
}
