/* ============================================
   INSTITUT PI RAMBLA HERITAGE - ORIGINAL DESIGN
   Preserving the exact black/gold aesthetic
   ============================================ */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Original Color Palette */
    --color-black: #000000;
    --color-gold: #BA893F;
    --color-white: #FFFFFF;
    --color-grey: #626262;
    --color-blue-glow: rgba(0, 100, 255, 0.3);

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Blue Glow Vignette Effect - Original Design Signature */
.blue-glow-overlay {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: inset 0 0 200px var(--color-blue-glow);
    z-index: 9999;
}

/* ============================================
   HEADER - Transparent, Original Design
   ============================================ */

.main-header {
    position: absolute;
    width: 100%;
    z-index: 1000;
    padding: 30px 60px;
    background: transparent;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    text-align: left;
}

.logo-image {
    height: 60px;
    width: auto;
    display: block;
}

.location-badge {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--color-gold);
    margin-top: 5px;
    letter-spacing: 1px;
}

/* Navigation - Original Minimalist Style */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    color: var(--color-white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-gold);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: all 0.3s ease;
}

/* ============================================
   HERO SLIDER - Full Screen Original Design
   ============================================ */

.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-image .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 1000px;
}

.slide-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 200;
    color: var(--color-white);
    text-transform: lowercase;
    letter-spacing: 2px;
    line-height: 1.4;
    margin: 0;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
}

.slider-btn {
    background: rgba(186, 137, 63, 0.3);
    border: 1px solid var(--color-gold);
    color: var(--color-white);
    font-size: 40px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--color-gold);
}

.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--color-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

/* ============================================
   MISSION SECTION - Video Background
   ============================================ */

.mission-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-background .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.static-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.section-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1000px;
    padding: 80px 40px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 200;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.section-title.gold {
    color: var(--color-gold);
}

.mission-text p {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--color-white);
    line-height: 2;
    letter-spacing: 0.5px;
    text-align: justify;
}

/* ============================================
   PROJECTS SECTION - Original Grid
   ============================================ */

.projects-section {
    background: var(--color-black);
    padding: 100px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(186, 137, 63, 0.2);
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-gold);
    box-shadow: 0 10px 40px rgba(186, 137, 63, 0.2);
}

.project-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-image .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.4s ease;
}

.project-card:hover .project-image .overlay {
    background: rgba(0, 0, 0, 0.2);
}

.project-content {
    padding: 30px;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 300;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.project-location {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--color-grey);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}

.project-description {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    color: var(--color-white);
    line-height: 1.8;
    margin-bottom: 20px;
}

.project-link {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--color-gold);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    display: inline-block;
}

.project-link:hover {
    color: var(--color-white);
}

/* ============================================
   DEPARTMENTS SECTION
   ============================================ */

.departments-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
    background: var(--color-black);
    padding: 100px 0;
    text-align: center;
}

.about-section .section-title {
    font-size: 28px;
    font-weight: 200;
    text-transform: lowercase;
    line-height: 1.8;
}

/* ============================================
   FOOTER - Original Design
   ============================================ */

.main-footer {
    background: var(--color-black);
    border-top: 1px solid rgba(186, 137, 63, 0.3);
    padding: 60px 40px 30px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo-image {
    height: 50px;
    width: auto;
    display: block;
    margin-bottom: 10px;
}

.footer-location {
    font-size: 11px;
    color: var(--color-gold);
    letter-spacing: 1px;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--color-grey);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(98, 98, 98, 0.3);
}

.footer-bottom p {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--color-grey);
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   BACK TO TOP BUTTON - Original Gold Button
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(186, 137, 63, 0.3);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    text-transform: uppercase;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background: var(--color-gold);
    color: var(--color-black);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .main-header {
        padding: 20px 30px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        padding: 100px 40px;
        transition: right 0.3s ease;
        z-index: 999;
    }

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

    .main-nav ul {
        flex-direction: column;
        gap: 20px;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .slide-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 24px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-nav {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .logo-text .logo-main {
        font-size: 18px;
    }

    .logo-text .logo-sub {
        font-size: 14px;
    }

    .slide-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .mission-text p {
        font-size: 13px;
        text-align: left;
    }
}

/* ============================================
   GLOBAL STRUCTURE PAGE - Additional Styles
   ============================================ */

.page-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-background .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 200;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 20px;
}

.page-subtitle {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    color: var(--color-white);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Structure Section */
.structure-section {
    background: var(--color-black);
    padding: 100px 0;
}

.structure-block {
    position: relative;
    min-height: 500px;
    margin-bottom: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.structure-block.headquarters {
    border: 2px solid var(--color-gold);
    box-shadow: 0 0 40px rgba(186, 137, 63, 0.3);
}

.structure-block.regional {
    border: 1px solid rgba(186, 137, 63, 0.3);
}

.structure-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.structure-background .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.80);
}

.structure-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 60px 40px;
}

.flag-icon {
    font-size: 60px;
    margin-bottom: 30px;
}

.structure-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 200;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.structure-location {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.structure-divider {
    width: 80px;
    height: 1px;
    background: var(--color-gold);
    margin: 0 auto 30px;
}

.structure-description {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    color: var(--color-white);
    line-height: 2;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
}

.structure-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 20px;
    border: 1px solid var(--color-gold);
    background: rgba(186, 137, 63, 0.1);
}

/* Responsive for Global Structure Page */
@media (max-width: 768px) {
    .page-title {
        font-size: 32px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .structure-title {
        font-size: 24px;
    }

    .flag-icon {
        font-size: 48px;
    }
}
