/* IECZ Custom Styles - Dark Blue & White Theme */

/* ===========================
   Color Variables (IECZ Brand)
   =========================== */
:root {
    --iecz-dark-blue: #2c3e50;
    --iecz-navy: #34495e;
    --iecz-white: #ffffff;
    --iecz-overlay-dark: rgba(44, 62, 80, 0.92);
    --iecz-overlay-light: rgba(44, 62, 80, 0.85);
}

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

body {
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--iecz-dark-blue);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ===========================
   Navigation Bar
   =========================== */
.navbar-iecz {
    background: var(--iecz-dark-blue);
    color: var(--iecz-white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--iecz-white);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    z-index: 1001;
}

.navbar-brand:hover {
    color: var(--iecz-white);
}

.navbar-brand img {
    height: 40px;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-link {
    color: var(--iecz-white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--iecz-white);
}

.navbar-link.active {
    background: rgba(255, 255, 255, 0.15);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--iecz-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--iecz-dark-blue);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-link {
        width: 100%;
        text-align: left;
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ===========================
   Hero Sections with Background
   =========================== */
.hero-iecz {
    position: relative;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--iecz-overlay-dark);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--iecz-white);
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    color: var(--iecz-white);
}

.hero-subtitle {
    font-size: 1.75rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    color: var(--iecz-white);
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    color: var(--iecz-white);
}

/* ===========================
   Section with Background Image
   =========================== */
.section-with-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 5rem 0;
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--iecz-overlay-light);
    z-index: 1;
}

.section-content {
    position: relative;
    z-index: 2;
}

/* ===========================
   Section Styles
   =========================== */
.section-iecz {
    padding: 5rem 0;
    position: relative;
}

.section-dark {
    background: var(--iecz-dark-blue);
    color: var(--iecz-white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: inherit;
}

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

.section-subtitle {
    font-size: 1.125rem;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    color: inherit;
}

/* ===========================
   Button Styles
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-iecz-primary {
    background: var(--iecz-white);
    color: var(--iecz-dark-blue);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-iecz-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.5);
    color: var(--iecz-dark-blue);
}

.btn-iecz-secondary {
    background: transparent;
    color: var(--iecz-white);
    border: 2px solid var(--iecz-white);
}

.btn-iecz-secondary:hover {
    background: var(--iecz-white);
    color: var(--iecz-dark-blue);
    transform: translateY(-2px);
}

/* ===========================
   Card Styles
   =========================== */
.card-iecz {
    background: var(--iecz-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(44, 62, 80, 0.1);
    height: 100%;
}

.card-iecz:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.25);
}

.card-iecz-icon {
    width: 70px;
    height: 70px;
    background: var(--iecz-dark-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--iecz-white);
    font-size: 2rem;
}

.card-iecz-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--iecz-dark-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.card-iecz-text {
    color: var(--iecz-dark-blue);
    text-align: center;
    line-height: 1.8;
    opacity: 0.8;
}

/* ===========================
   Association Cards
   =========================== */
.association-card {
    background: var(--iecz-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(44, 62, 80, 0.1);
    height: 100%;
}

.association-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.25);
}

.association-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.association-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--iecz-dark-blue);
    margin-bottom: 0.5rem;
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
    background: var(--iecz-dark-blue);
    padding: 5rem 2rem;
    color: var(--iecz-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--iecz-white);
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    color: var(--iecz-white);
}

/* ===========================
   Footer Styles
   =========================== */
.footer-iecz {
    background: var(--iecz-dark-blue);
    color: var(--iecz-white);
    padding: 3rem 0 1.5rem;
}

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

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--iecz-white);
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: var(--iecz-white);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   Animation Classes
   =========================== */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

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

/* ===========================
   Responsive Design
   =========================== */

/* Tablet */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-iecz {
        padding: 3rem 0;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta-text {
        font-size: 1.125rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hero-iecz {
        min-height: 500px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .card-iecz {
        padding: 1.5rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-text {
        font-size: 1rem;
    }

    .footer-iecz {
        padding: 2rem 0 1rem;
    }
}
/* ===========================
   Mobile Menu Fixes - UPDATED
   =========================== */

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: fixed;
        top: 70px; /* Adjust based on your navbar height */
        left: 0;
        right: 0;
        background: var(--iecz-dark-blue);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
    }

    .navbar-menu.active {
        display: flex;
    }

    /* Fix for user dropdown in mobile */
    .relative {
        width: 100%;
        position: static !important;
    }

    .relative [x-show] {
        position: static !important;
        width: 100% !important;
        margin-top: 0.5rem;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .relative [x-show] a,
    .relative [x-show] button {
        color: white !important;
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .relative [x-show] a:hover,
    .relative [x-show] button:hover {
        background: rgba(255, 255, 255, 0.2) !important;
    }
}
/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}



/* ===========================
   Critical Mobile Fixes
   =========================== */

/* Ensure proper box sizing */
* {
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Mobile-specific container fixes */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    /* Fix for buttons in mobile */
    .btn {
        width: 100%;
        margin: 0.5rem 0;
        text-align: center;
        justify-content: center;
    }
    
    /* Fix for register button in nav */
    .navbar-menu .btn {
        margin-left: 0 !important;
        margin-top: 1rem;
    }
    
    /* Ensure images are responsive */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix for logo size on mobile */
    .navbar-brand img {
        height: 60px !important;
        width: auto !important;
    }
    
    .navbar-brand span {
        font-size: 1.5rem !important;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .navbar-brand img {
        height: 50px !important;
    }
    
    .navbar-brand span {
        font-size: 1.25rem !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
}


/* ===========================
   Hero Section Mobile Fixes
   =========================== */

@media (max-width: 768px) {
    .hero-iecz {
        min-height: 400px;
        padding: 2rem 1rem;
    }

    .hero-content {
        padding: 1rem;
        width: 100%;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
    }

    .hero-description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem;
    }

    /* Ensure text doesn't overflow */
    .hero-content * {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .hero-iecz {
        min-height: 350px;
        padding: 1.5rem 0.5rem;
    }

    .hero-title {
        font-size: 1.5rem !important;
        padding: 0 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
        padding: 0 0.5rem;
    }

    .hero-description {
        font-size: 0.85rem !important;
        padding: 0 0.5rem;
    }
}


/* ===========================
   Text Wrapping & Container Fixes
   =========================== */

/* Ensure all containers handle text properly */
.container, .hero-content, .section-content {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix for long words and text */
.hero-title, .hero-subtitle, .hero-description,
.section-title, .section-subtitle,
.card-iecz-title, .card-iecz-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Specific fix for the main hero text */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        padding: 0 10px;
    }
    
    /* Break long words */
    .hero-title, .hero-subtitle {
        word-break: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
    }
}


/* ===========================
   EMERGENCY MOBILE TEXT FIX
   =========================== */

@media (max-width: 768px) {
    /* Force proper text rendering */
    body {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Fix all headings and text */
    h1, h2, h3, h4, h5, h6,
    .hero-title, .hero-subtitle, .hero-description,
    .section-title, .section-subtitle {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        line-height: 1.3 !important;
        padding: 0 10px !important;
    }
    
    /* Specific hero fixes */
    .hero-title {
        font-size: 1.8rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-description {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
    
    /* Ensure containers don't cause overflow */
    .container, .hero-content, .section-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem !important;
        padding: 0 5px !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        padding: 0 5px !important;
    }
    
    .hero-description {
        font-size: 0.9rem !important;
        padding: 0 5px !important;
    }
}



/* ===========================
   CRITICAL MOBILE TEXT FIXES
   =========================== */

/* Force proper text wrapping on all elements */
.hero-title, .hero-subtitle, .hero-description,
.section-title, .section-subtitle,
.text-4xl, .text-5xl, .text-3xl, .text-2xl, .text-xl, .text-lg {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    /* Fix for long hero titles */
    .text-5xl {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        padding: 0 10px;
    }
    
    .text-4xl {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    .text-3xl {
        font-size: 1.25rem !important;
    }
    
    .text-2xl {
        font-size: 1.125rem !important;
    }
    
    .text-xl {
        font-size: 1rem !important;
    }
    
    .text-lg {
        font-size: 0.9rem !important;
    }
    
    /* Fix container padding */
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Fix glass morphism containers */
    .backdrop-blur-lg {
        margin: 0 0.5rem !important;
    }
    
    /* Ensure buttons don't overflow */
    .flex.flex-col.sm\\:flex-row .btn {
        min-width: auto !important;
        width: 100% !important;
        margin: 0.25rem 0 !important;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .text-5xl {
        font-size: 1.5rem !important;
        padding: 0 5px !important;
    }
    
    .text-4xl {
        font-size: 1.25rem !important;
    }
    
    /* Reduce padding on glass containers */
    .p-12 {
        padding: 1.5rem !important;
    }
    
    .p-8 {
        padding: 1rem !important;
    }
}


/* ===========================
   EMERGENCY TEXT BREAK FIXES
   =========================== */

/* Force break long words */
.break-words {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

/* Mobile text size overrides */
@media (max-width: 768px) {
    /* Override Tailwind text sizes for mobile */
    [class*="text-"] {
        max-width: 100% !important;
    }
    
    /* Specific hero text fixes */
    .hero-title {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        padding: 0 0.5rem !important;
    }
    
    /* Ensure glass containers don't cause overflow */
    .backdrop-blur-lg {
        width: calc(100% - 1rem) !important;
        margin: 0 auto !important;
    }
}

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    max-width: 100%;
}