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

:root {
    --primary-color: #ffffff;
    --accent-color: #d4af37; /* Gold accent */
    --hover-color: #f1f1f1;
    --bg-dark: #121212;
    --header-height: 100px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-font-size: 0.95rem;
    --dropdown-bg: rgba(18, 18, 18, 0.98); /* Near full opacity for better readability */
    --section-bg-light: #efede9;
    --text-dark: #333333;
    --text-muted: #666666;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    position: fixed; /* Make it sticky */
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Logo starts at top */
    padding: 3vw 4rem;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(18, 18, 18, 0.85); /* Increased transparency for a lighter feel */
    padding: 0.1rem 4rem; /* Minimal padding */
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.logo-container, .logo-container a {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-container img {
    height: 224px; /* Matches Squarespace's 224px */
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled .logo-container img {
    height: 60px; /* Even smaller for maximum content space */
}

nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 2rem;
    transition: var(--transition);
}

header.scrolled nav {
    /* No padding-top needed since we use height: 100% and align-items: center */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: var(--nav-font-size);
    font-weight: 500;
    text-transform: none;
    padding: 0.5rem 0;
    transition: var(--transition);
    cursor: pointer;
}

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

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dropdown-bg);
    min-width: 240px;
    padding: 1rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    padding-left: 1.75rem;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: right; /* Text is right-aligned in screenshots */
    background: url('../images/main/cncp-back.webp') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Subtle overlay as shown in screenshots */
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    padding: 0 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 600;
    max-width: 800px;
    line-height: 1.1;
    margin-bottom: 2rem;
    animation: fadeInRight 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInRight 1.2s ease-out;
}

/* Social Icons */
.social-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.social-icons a {
    color: white;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: var(--accent-color);
}

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

/* Mobile Responsive Placeholder */
@media (max-width: 1024px) {
    header {
        padding: 0 2rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .nav-menu {
        display: none; /* Will implement mobile menu later */
    }
}

/* Federações Section */
.federacoes {
    background: var(--section-bg-light) !important;
    color: var(--text-dark);
    padding: 3rem 4rem 6rem 4rem;
    text-align: center;
    position: relative;
    z-index: 5;
}

.federacoes h2 {
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 4rem;
    color: var(--text-dark);
}

.federacoes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.federacao-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.federacao-logo {
    width: 100%;
    height: 320px; /* Max size for logos */
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.federacao-logo:hover {
    transform: scale(1.05);
}

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

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.federacao-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    height: 3.9rem; /* Allow 2 lines roughly */
    display: flex;
    align-items: center;
    justify-content: center;
}

.federacao-details {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.federacao-details p {
    margin-bottom: 0.5rem;
}

.federacao-details strong {
    color: var(--text-dark);
    font-weight: 500;
}

.federacao-details a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.federacao-details a:hover {
    color: var(--accent-color);
}

@media (max-width: 1024px) {
    .federacoes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .federacoes {
        padding: 4rem 2rem;
    }
    .federacoes h2 {
        font-size: 2.5rem;
    }
    .federacoes-grid {
        grid-template-columns: 1fr;
    }
}

/* Notícias Section */
.noticias {
    background: #2a2a2a; /* Darker grey to differentiate */
    padding: 6rem 4rem;
    color: white;
}

.noticias-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 4rem;
}

.noticias-header h2 {
    font-size: 3.5rem;
    font-weight: 500;
    color: #a8b8a8; /* Sage green color */
}

.noticias-nav {
    position: absolute;
    right: 0;
    display: flex;
    gap: 1.5rem;
}

.nav-arrow {
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.5;
    transition: var(--transition);
}

.nav-arrow:hover {
    opacity: 1;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.noticia-card {
    display: flex;
    flex-direction: column;
}

.noticia-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #333;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.noticia-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0.9;
}

.noticia-card:hover .noticia-image img {
    transform: scale(1.05);
    opacity: 1;
}

.noticia-date {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.noticia-card h3 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    height: 3.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

@media (max-width: 1024px) {
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .noticias {
        padding: 4rem 2rem;
    }
    .noticias-header h2 {
        font-size: 2.5rem;
    }
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    .noticias-nav {
        display: none;
    }
}
