@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    /* RS Flag Colors - Refined for Web */
    --rs-green: #0a4f32; 
    --rs-red: #c1121f; 
    --rs-yellow: #dda15e; 
    
    /* Neutral & Text */
    --text-dark: #212529;
    --text-muted: #5e646d;
    --bg-white: #ffffff;
    --bg-light: #f5f7f9;
    --bg-gray: #e9ecef;
    --border-color: #dee2e6;

    /* Shadows & Radii */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Layout */
    --max-width: 1200px;
}

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

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- TOP HEADER & NAVIGATION --- */
header.top-header {
    background-color: var(--rs-green);
    color: var(--bg-white);
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 500;
}

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

header.top-header a {
    color: var(--rs-yellow);
    text-decoration: none;
    margin-left: 15px;
}

header.top-header a:hover {
    text-decoration: underline;
}

nav.main-nav {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--rs-yellow);
}

nav.main-nav .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--rs-green);
    margin: 0;
    font-weight: 700;
}

.brand h1 span {
    color: var(--rs-red);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rs-red);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--rs-red);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* --- HERO BANNER --- */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--rs-green);
    background-image: linear-gradient(rgba(10, 79, 50, 0.75), rgba(10, 79, 50, 0.85)), url('fundo.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--bg-white);
    margin-bottom: 60px;
    border-bottom: 8px solid var(--rs-red);
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: 30px;
    color: var(--bg-white);
}

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

/* Page Header for Inner Pages */
.page-header {
    background: var(--rs-green);
    color: white;
    padding: 60px 0;
    text-align: center;
    background-image: linear-gradient(rgba(10, 79, 50, 0.9), rgba(10, 79, 50, 0.9)), url('fundo.webp');
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid var(--rs-yellow);
    margin-bottom: 40px;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    margin-bottom: 10px;
}

/* --- MAIN CONTENT & CONTAINERS --- */
main {
    padding-bottom: 80px;
}

.content-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 50px;
    margin: 0 auto 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* Institutional Typography */
h2.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--rs-green);
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

h2.section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 35px;
    background-color: var(--rs-red);
    border-radius: 3px;
}

h3 {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    font-size: 1.4rem;
    margin-top: 35px;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.category-title h3 {
    border: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--rs-green);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.category-title h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--rs-yellow);
}

p {
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

ul {
    list-style: none;
    margin-bottom: 24px;
}

ul li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    color: var(--text-muted);
}

ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    background-color: var(--rs-red);
    border-radius: 50%;
}

p a, li a:not(.card-btn):not(.btn) {
    color: var(--rs-red);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.2s ease;
}

p a:hover, li a:not(.card-btn):not(.btn):hover {
    border-bottom: 1px solid var(--rs-red);
}

/* --- GRIDS & CARDS --- */
.category {
    margin-bottom: 70px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.card-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.card-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: var(--rs-yellow);
    transition: width 0.3s ease;
    z-index: 0;
}

.card-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--rs-green);
}

.card-btn:hover::before {
    width: 6px;
    background-color: var(--rs-red);
}

.card-btn-icon {
    font-size: 2.2rem;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--bg-light);
    border-radius: var(--radius-sm);
}

.card-btn span {
    font-family: 'Roboto', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    z-index: 1;
}

/* --- FEATURED BOX --- */
.featured-box {
    background-color: var(--rs-green);
    color: var(--bg-white);
    padding: 40px 50px;
    border-radius: var(--radius-md);
    margin: 50px 0;
    position: relative;
    box-shadow: var(--shadow-md);
    border-left: 8px solid var(--rs-red);
}

.featured-box h3 {
    color: var(--rs-yellow);
    border: none;
    margin-top: 0;
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif;
}

.featured-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    background-color: var(--rs-red);
    color: var(--bg-white);
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #a30e16;
}

/* --- FOOTER --- */
footer {
    background-color: #111a14;
    color: #9taaa3;
    padding: 60px 0 30px;
    border-top: 5px solid var(--rs-green);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    color: var(--bg-white);
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-brand h2 span {
    color: var(--rs-red);
}

.footer-brand p {
    color: #8c9b93;
}

.footer-links h4 {
    color: var(--bg-white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    padding: 0;
    margin-bottom: 10px;
}

.footer-links ul li::before {
    display: none;
}

.footer-links ul li a {
    color: #8c9b93;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links ul li a:hover {
    color: var(--rs-yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #6a7c72;
    font-size: 0.9rem;
}

.footer-bottom strong {
    color: var(--bg-white);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        height: auto !important;
        padding: 15px 0;
        gap: 15px;
    }
    
    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .content-wrapper {
        padding: 30px 20px;
    }
    
    .featured-box {
        padding: 30px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
