/* Global Styles */
:root {
    --primary-color: #f39d2c;
    --secondary-color: #211f20;
    --text-color: #333;
    --light-color: #fff;
    --gray-color: #f4f4f4;
    --dark-gray: #666;
    --font-primary: 'Arial', sans-serif;
    --transition: all 0.3s ease;
    
    /* ESTAT specific colors */
    --estat-orange: #f39d2c;
    --estat-dark: #211f20;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

section {
    padding: 4rem 0;
}

/* Button Styles */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    transition: var(--transition);
    text-align: center;
}

.cta-button:hover {
    background-color: #e08b1b;
    transform: translateY(-2px);
}

.secondary-button {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 22px;
    border-radius: 4px;
    font-weight: bold;
    transition: var(--transition);
    text-align: center;
}

.secondary-button:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #211f20; /* Exact color from ESTAT site */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background-color: rgba(33, 31, 32, 0.95);
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    padding: 0.5rem 0;
    display: inline-block;
    transition: transform 0.3s ease;
}

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

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 2rem;
    font-weight: 500;
    color: var(--light-color);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

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

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

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--secondary-color);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 1rem;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

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

.dropdown-section h4 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-content a {
    display: block;
    color: var(--light-color);
    padding: 0.5rem 0;
    margin: 0;
    transition: var(--transition);
}

.dropdown-content a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-links .cta-button {
    margin-left: 2rem;
    padding: 10px 20px;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: var(--light-color);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.nav-links .cta-button:hover {
    background-color: #e08b1b;
    border-color: #e08b1b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--light-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger:focus {
    outline: none;
}

/* Footer Styles */
footer {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

.footer-section a {
    color: var(--light-color);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--secondary-color);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.05);
        margin: 0.5rem 0;
        padding: 0.5rem 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-content {
        max-height: 500px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        margin: 0.8rem 0;
        font-size: 1.1rem;
        width: 100%;
        padding: 0.8rem 0;
        color: var(--light-color);
    }
    
    .nav-links .cta-button {
        margin: 1.5rem 0 0;
        width: 100%;
        text-align: center;
    }

    .hamburger {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

@media (min-width: 993px) {
    .hamburger {
        display: none;
    }
    
    .nav-links {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        overflow: visible;
    }
    
    .nav-links a {
        margin-left: 2rem;
        width: auto;
        padding: 0.5rem 0;
    }
    
    .nav-links .cta-button {
        margin-left: 2rem;
        width: auto;
    }
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin-bottom: 2rem;
    }
}
