/*
* File: style.css
* Description: Custom styles for the CNI Barranquilla website.
* Design System: Neomorphism with Neo-Brutalism elements.
* Author: AI Assistant
*/

/* ----------------------------------------------------------------
   1. CSS Variables & Root Styles
   ---------------------------------------------------------------- */

:root {
    /* Color Palette (Complementary: Blue & Orange/Gold) */
    --primary-color: #0d47a1; /* Deep Maritime Blue */
    --primary-darker: #002171;
    --accent-color: #ff9800; /* Maritime Gold/Orange */
    --accent-darker: #c66900;
    
    /* Neomorphism Base */
    --background-color: #eef2f9;
    --text-color: #333745;
    --text-light: #5f6779;
    --text-headings: #222831;
    --white-color: #FFFFFF;
    
    /* Neomorphism Shadows */
    --light-shadow: -10px -10px 20px rgba(255, 255, 255, 0.8);
    --dark-shadow: 10px 10px 20px rgba(163, 177, 198, 0.6);
    --inset-light-shadow: inset -5px -5px 10px rgba(255, 255, 255, 0.8);
    --inset-dark-shadow: inset 5px 5px 10px rgba(163, 177, 198, 0.6);

    /* Typography */
    --font-header: 'Oswald', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Spacing & Borders */
    --border-radius-soft: 15px;
    --border-radius-sharp: 5px;
    --transition-speed: 0.3s;
}

/* ----------------------------------------------------------------
   2. Base & Global Styles
   ---------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* For pages like privacy/terms */
main.container.py-5 {
    padding-top: 100px !important;
}

/* ----------------------------------------------------------------
   3. Typography
   ---------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 700;
    color: var(--text-headings);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.section-title::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

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

/* ----------------------------------------------------------------
   4. Header & Navigation
   ---------------------------------------------------------------- */

.header {
    background: rgba(238, 242, 249, 0.85); /* Semi-transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--dark-shadow);
    border-bottom: 1px solid rgba(163, 177, 198, 0.3);
}

.navbar-brand {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link {
    font-family: var(--font-header);
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 400;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    color: var(--text-headings) !important;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: var(--accent-color);
    transition: transform var(--transition-speed) ease-in-out;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active,
.nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border: 2px solid var(--primary-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(13, 71, 161, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ----------------------------------------------------------------
   5. Hero Section
   ---------------------------------------------------------------- */

.hero-section {
    position: relative;
    min-height: 90vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    color: var(--white-color);
}

.hero-section h1, .hero-section p {
    color: var(--white-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}


/* ----------------------------------------------------------------
   6. Global Components (Buttons, Cards, Forms)
   ---------------------------------------------------------------- */

/* --- Buttons --- */
.btn {
    font-family: var(--font-header);
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius-sharp);
    box-shadow: var(--light-shadow), var(--dark-shadow);
    transition: all var(--transition-speed) ease-in-out;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: -5px -5px 15px rgba(255, 255, 255, 0.9), 5px 5px 15px rgba(163, 177, 198, 0.8);
}

.btn:active, .btn:focus {
    box-shadow: var(--inset-light-shadow), var(--inset-dark-shadow) !important;
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: var(--primary-darker);
    color: var(--white-color);
}

/* --- Neomorphic Elements --- */
.neomorphic-element, .neomorphic-card {
    background-color: var(--background-color);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--light-shadow), var(--dark-shadow);
    transition: box-shadow var(--transition-speed) ease;
}

.neomorphic-card:hover {
    box-shadow: -5px -5px 15px rgba(255, 255, 255, 0.9), 5px 5px 15px rgba(163, 177, 198, 0.8);
    transform: translateY(-5px);
}

/* --- Cards (Services, etc.) --- */
.card.neomorphic-card {
    border: none;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card .card-image {
    width: 100%;
    height: 200px; /* Fixed height for image container */
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius-soft);
    overflow: hidden;
    box-shadow: var(--inset-light-shadow), var(--inset-dark-shadow);
}

.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.card .card-content {
    flex-grow: 1;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.4rem;
}

/* --- Info Cards (External Resources) --- */
.info-card {
    background-color: var(--background-color);
    border-radius: var(--border-radius-sharp);
    border-left: 5px solid var(--accent-color);
    box-shadow: var(--dark-shadow);
    transition: all var(--transition-speed) ease;
}
.info-card:hover {
    transform: translateX(5px);
    box-shadow: 15px 15px 25px rgba(163, 177, 198, 0.7);
}
.info-card a {
    text-decoration: none;
}
.info-card a:hover {
    text-decoration: underline;
}

/* --- Forms --- */
.neomorphic-form .form-control {
    background-color: var(--background-color);
    border: none;
    border-radius: var(--border-radius-sharp);
    padding: 12px 20px;
    box-shadow: var(--inset-light-shadow), var(--inset-dark-shadow);
    color: var(--text-color);
    transition: box-shadow var(--transition-speed) ease;
}

.neomorphic-form .form-control:focus {
    box-shadow: var(--inset-light-shadow), var(--inset-dark-shadow), 0 0 0 3px rgba(13, 71, 161, 0.2);
    outline: none;
}

.neomorphic-form .form-label {
    font-family: var(--font-header);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-headings);
}

/* ----------------------------------------------------------------
   7. Section Specific Styles
   ---------------------------------------------------------------- */
.bg-light-neumorphic {
    background-color: #e4e9f2;
}

/* --- About Section --- */
.stat-widget {
    padding: 2rem;
    text-align: center;
}
.stat-number {
    font-family: var(--font-header);
    color: var(--primary-color);
    font-size: 3.5rem;
}
.stat-label {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-light);
    font-size: 1rem;
}

/* --- Methodology Section --- */
.progress {
    border-radius: var(--border-radius-sharp);
    background-color: #d1d9e6;
    box-shadow: var(--inset-light-shadow), var(--inset-dark-shadow);
}
.progress-bar {
    background-color: var(--primary-color);
    font-family: var(--font-header);
}

/* --- Partners Section --- */
.partner-logo {
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease;
    filter: grayscale(100%);
}
.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* --- Contact Teaser Section --- */
.contact-teaser-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* --- Contact Page --- */
.map-container {
    overflow: hidden;
    border-radius: var(--border-radius-soft);
}
.map-container iframe {
    border: 0;
}

/* ----------------------------------------------------------------
   8. Footer
   ---------------------------------------------------------------- */

.footer {
    background-color: var(--text-headings);
    color: rgba(255, 255, 255, 0.7);
}

.footer h5 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
}

.footer a.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    display: inline-block;
    padding: 0.2rem 0;
}

.footer a.footer-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.copyright-bar {
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ----------------------------------------------------------------
   9. Animations & Effects
   ---------------------------------------------------------------- */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.parallax-content {
    transition: transform 0.5s ease-out;
}

/* ----------------------------------------------------------------
   10. Success Page
   ---------------------------------------------------------------- */
.vh-100 {
    min-height: 100vh;
}
.vh-100 .neomorphic-element {
    max-width: 600px;
    width: 90%;
}


/* ----------------------------------------------------------------
   11. Media Queries (Responsiveness)
   ---------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
        text-align: center;
    }
    .nav-link {
        padding: 0.8rem 1rem !important;
    }
    .nav-link::after {
        display: none;
    }
    .hero-section {
        min-height: 70vh;
    }
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        background-attachment: scroll; /* Disable parallax on mobile for performance */
        min-height: 60vh;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .stat-widget {
        margin-bottom: 1.5rem;
    }
}