/* ========================================
   BASE STYLES (Your Original Styles)
   ======================================== */
.error {
    border: 1px solid red !important;
    outline: none;
}

.error:focus,
.error:hover,
.error:active,
.radio-container:has(.error-message) input:focus {

    border: 1px solid red !important;
    outline: 3px solid rgba(255, 68, 68, 0.26) !important;
    box-shadow: 0 0 0 .25rem rgba(253, 13, 13, 0.25);
}

.error-message {
    color: red;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

:root {
    --primary-color: #0048b1;
    --secondary-color: #1d3d8a;
    --primary-bg-video: rgb(0 72 177 / 94%);
    --secondary-bg-video: rgb(29 61 138 / 85%);
    --secondary-color: #1d3d8a;
    --text-color: #333;
    --background-color: #f8f9fa;
}

.whitesmoke {
    background-color: whitesmoke;
}

body {
    font-size: 18px;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.uppercase {
    text-transform: uppercase;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.navbar-logo {
    height: 35px;
    width: auto;
    max-width: 100%;
}

.top-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 0;
}

.main-navbar {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

.navbar-custom {
    padding: 8px 0;
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
    color: var(--primary-color);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.main-navbar .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    padding: 8px 15px;
    transition: color 0.3s ease;
}

/* Active menu styling */
.nav-link.active {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
    font-weight: 600;
}

/* Hover effect for non-active items */
.nav-link:not(.active):hover {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* Main navbar styling */
.main-navbar {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: #333;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    height: 100%;
}

.main-navbar .nav-link:hover {
    color: var(--primary-color);
}

.contact-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info:hover {
    color: #3a6b1e;
}

.hero-section {
    background: linear-gradient(135deg, var(--secondary-bg-video), var(--primary-bg-video)),
        url('../images/banner-image.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.hero-section-video {
    background: linear-gradient(135deg, var(--secondary-bg-video), var(--primary-bg-video)),
        url('../videos/agrivoltaics-hero.mp4');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 800px;
    margin-inline-start: auto;
    margin-inline-end: auto;
}

.button-container {
    text-align: center;
    width: 100%;
}

.btn-simulate {
    background-color: white;
    color: var(--primary-color);
    font-weight: bold;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 auto;
    text-decoration: none;
}

.btn-modal {
    background-color: white;
    color: var(--primary-color);
    font-weight: bold;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 auto;
    text-decoration: none;
}

.btn-teal {
    background-color: var(--primary-color);
    color: white;
}

.btn-simulate:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-redirect {
    text-decoration: none;
}

.section-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 30px;
    font-size: 2rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    line-height: 25px;
    margin-bottom: 0;
    padding: 10px 0;
}

.benefit-icon {
    color: var(--secondary-color);
    margin-inline-end: 15px;
    font-size: 1.2rem;
    margin-top: 3px;
    flex-shrink: 0;
    width: 17px;
    height: 17px;
}

.table-section {
    background-color: #f8f9fa;
    padding: 50px 0;
}

.custom-table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

.custom-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 15px 10px;
}

.custom-table td {
    text-align: center;
    padding: 12px 10px;
    vertical-align: middle;
}

.btn-custom {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0 auto;
    /* Center the button */
}

.btn-custom:hover {
    background-color: #0d6efd;
    color: white;
    transform: translateY(-2px);
}

.required-field {
    color: red;
}

/* Fix for CTA section button centering */
.feature-card .btn-custom,
.feature-card .btn-outline-secondary {
    display: block;
    margin: 10px auto 0;
    text-align: center;
}

/* Ensure text-center applies to buttons */
.text-center .btn-custom,
.text-center .btn-outline-secondary {
    margin-inline-start: auto;
    margin-inline-end: auto;
}

.footer {
    background-color: #eee;
    color: 000;
    padding: 20px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer p {
    margin: 0;
    text-align: center;
}

.form-section {
    background-color: #f8f9fa;
    padding: 50px 0;
}

.form-check, .form-check-input, .form-check-label  {
    cursor: pointer;
}

.solar-panel-img {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
}

.solar-panel-img-fixed-height {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.feature-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    height: 100%;
}

.feature-card.custom-card {
    margin-bottom: 5px;
    padding: 0 30px;
}

.lang-btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    padding: 5px 15px;
}

.lang-btn:hover,
.lang-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.language-dropdown {
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background: white;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 80px;
}

.language-dropdown:hover {
    background-color: #f8f9fa;
}

.dropdown-menu {
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 0;
    margin-top: 2px;
    min-width: inherit !important;
    width: 100% !important;
}

.dropdown.me-2 {
    margin-inline-end: 0 !important;
}

.dropdown-item {
    padding: 8px 15px;
    font-size: 14px;
    color: var(--primary-color);
    border: none;
    background: none;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.flag-icon {
    width: 20px;
    height: 15px;
    margin-inline-end: 8px;
    border-radius: 2px;
}


.badge.bg-success.rounded-circle.p-3.mb-3 {
    padding: 1rem 1.30rem !important;
}

.badge.bg-success {
    background-color: var(--secondary-color) !important;
}

/* Language switching styles */
[data-lang="fr"] {
    display: block;
}

[data-lang="en"] {
    display: none;
}

/* When lang-fr class is on body (default) */
.lang-fr [data-lang="fr"] {
    display: block;
}

.lang-fr [data-lang="en"] {
    display: none;
}

/* When lang-en class is on body */
.lang-en [data-lang="fr"] {
    display: none;
}

.lang-en [data-lang="en"] {
    display: block;
}

/* Button specific language switching */
.btn[data-lang="fr"] {
    display: inline-block;
    margin: 0 auto;
}

.btn[data-lang="en"] {
    display: none;
}

.lang-fr .btn[data-lang="fr"] {
    display: inline-block;
    margin: 0 auto;
}

.lang-fr .btn[data-lang="en"] {
    display: none;
}

.lang-en .btn[data-lang="fr"] {
    display: none;
}

.lang-en .btn[data-lang="en"] {
    display: inline-block;
    margin: 0 auto;
}

/* Specific button centering for different button types */
.btn-simulate[data-lang="fr"],
.btn-simulate[data-lang="en"] {
    display: inline-block;
    margin: 0 auto;
}

.lang-fr .btn-simulate[data-lang="fr"] {
    display: inline-block;
    margin: 0 auto;
}

.lang-fr .btn-simulate[data-lang="en"] {
    display: none;
}

.lang-en .btn-simulate[data-lang="fr"] {
    display: none;
}

.lang-en .btn-simulate[data-lang="en"] {
    display: inline-block;
    margin: 0 auto;
}

/* CTA section buttons */
.btn-custom[data-lang="fr"],
.btn-custom[data-lang="en"],
.btn-outline-secondary[data-lang="fr"],
.btn-outline-secondary[data-lang="en"] {
    display: block;
    margin: 10px auto 0;
    text-align: center;
}

.lang-fr .btn-custom[data-lang="fr"],
.lang-fr .btn-outline-secondary[data-lang="fr"] {
    display: block;
    margin: 10px auto 0;
    text-align: center;
}

.lang-fr .btn-custom[data-lang="en"],
.lang-fr .btn-outline-secondary[data-lang="en"] {
    display: none;
}

.lang-en .btn-custom[data-lang="fr"],
.lang-en .btn-outline-secondary[data-lang="fr"] {
    display: none;
}

.lang-en .btn-custom[data-lang="en"],
.lang-en .btn-outline-secondary[data-lang="en"] {
    display: block;
    margin: 10px auto 0;
    text-align: center;
}

/* ========================================
   TABLE FIXES FOR INVESTMENT EXAMPLES
   ======================================== */

/* Make table more responsive */
.custom-table {
    width: 100%;
    min-width: 500px;
}

/* Better table spacing */
.custom-table th,
.custom-table td {
    white-space: nowrap;
    min-width: 120px;
}

/* Investment table specific improvements */
.custom-table th:first-child,
.custom-table td:first-child {
    min-width: 150px;
    white-space: normal;
}

/* Registration form Styles */

#spinner {
    text-align: center;
    padding: 20px;
}

#spinner i {
    font-size: 2rem;
    color: #2E7D32;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    /* text-align: center; */
    margin-bottom: 30px;
}

#message[success] {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

#message[data-error] {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.radio-field {
    display: inline-flex;
    align-items: center;
    margin-inline-end: 20px;
    cursor: pointer;
}

/* .radio-form-btn {
    margin-inline-start: 0px;
    margin-inline-end: 5px;
} */

.radio-field input[type="radio"] {
    /* margin-inline-start: 8px; */
    margin-inline-end: 6px;
}

.field-wrapper {
    margin-bottom: 20px;
}

.field-wrapper label:first-child {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.hide-form-field {
    display: none;
}

.row-field {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 767px) {
    .row-field {
        grid-template-columns: 1fr;
    }
}

.form-field.select select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.btn-blue {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-blue:disabled {
    background-color: #eaeaea;
}

.btn-blue:hover {
    background-color: #0d6efd
}

.successMessage {
    text-align: center;
}

.successMessage h3 {
    color: #2E7D32;
    margin-bottom: 15px;
}

.basic-list {
    list-style: none;
    padding: 0;
}

.custom-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 1rem;
}

.custom-list li {
    border-bottom: 1px solid gray;
    padding: 5px;
}

/* Mobile table improvements */
@media (max-width: 767.98px) {
    .custom-table {
        min-width: 700px;
    }

    .custom-table th,
    .custom-table td {
        font-size: 0.75rem;
        padding: 8px 4px;
        min-width: 100px;
    }

    .custom-table th:first-child,
    .custom-table td:first-child {
        min-width: 120px;
    }
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Desktop navigation improvements */
@media (min-width: 992px) {
    .main-navbar .nav-link {
        padding: 8px 0 8px 35px !important;
    }

    /* Home icon specific styling for desktop */
    .main-navbar .nav-link[title="Accueil"] {
        padding: 8px 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
    }

    .main-navbar .nav-link[title="Accueil"] i {
        font-size: 16px;
    }

    /* Ensure buttons are centered on desktop */
    .feature-card .btn-custom,
    .feature-card .btn-outline-secondary {
        display: inline-block;
        margin: 10px auto 0;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 991.98px) {
    body {
        font-size: 17px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .custom-table {
        font-size: 0.9rem;
    }
}

/* Navigation mobile styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
        border: 1px solid #e9ecef;
    }

    .navbar-nav {
        text-align: center;
    }

    .navbar-nav .nav-link {
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
        font-size: 16px;
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .navbar-nav .nav-link:hover {
        background-color: #f8f9fa;
    }

    /* Mobile header layout */
    .top-header .d-flex {
        gap: 8px;
    }

    .navbar-toggler {
        padding: 6px 8px;
        font-size: 1rem;
        background: none;
        /* border: 1px solid var(--primary-color); */
        border-radius: 4px;
        color: var(--primary-color);
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler:hover {
        background-color: rgba(45, 80, 22, 0.1);
    }
}

/* Mobile Responsive Styles */
@media (max-width: 767.98px) {

    /* Base font size adjustment */
    body {
        font-size: 16px;
    }

    /* Header adjustments */
    .top-header {
        padding: 8px 0;
    }

    .navbar-logo {
        height: 25px;
    }

    .contact-info {
        font-size: 12px;
    }

    .language-dropdown {
        font-size: 12px;
        padding: 6px 8px;
        min-width: 60px;
    }

    /* Mobile hamburger and language dropdown alignment */
    .top-header .d-flex {
        align-items: center;
    }

    .navbar-toggler {
        padding: 4px 6px;
        font-size: 0.9rem;
    }

    .flag-icon {
        width: 16px;
        height: 12px;
        margin-inline-end: 4px;
    }

    /* Hero section mobile */
    .hero-section {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .btn-simulate {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Section titles mobile */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        text-align: center;
    }

    /* Benefits section mobile */
    .benefit-item {
        margin-bottom: 15px;
        padding: 8px 0;
    }

    .benefit-icon {
        margin-inline-end: 10px;
        font-size: 1.1rem;
    }

    /* Image adjustments */
    .solar-panel-img {
        margin-top: 20px;
    }

    /* Table mobile */
    .custom-table {
        font-size: 0.8rem;
    }

    .custom-table th {
        padding: 10px 5px;
        font-size: 0.75rem;
    }

    .custom-table td {
        padding: 8px 5px;
        font-size: 0.8rem;
    }

    /* Form mobile */
    .feature-card {
        padding: 20px 15px;
        margin: 0 10px;
    }

    .feature-card.custom-card {
        margin-bottom: 2px;
        padding: 0 5px;
    }
    
    #contactModal:has(.custom-card) h3.modal-title {
        font-size: 20px;
    }

    .btn-custom {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        margin-top: 10px;
    }

    /* Ensure buttons are centered on mobile */
    .feature-card .btn-custom,
    .feature-card .btn-outline-secondary {
        display: block;
        margin: 10px auto 0;
        text-align: center;
        width: 100%;
    }

    /* Spacing adjustments */
    .py-5 {
        padding: 2.5rem 0 !important;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile specific utilities */
    .mobile-center {
        text-align: center;
    }

    .mobile-full-width {
        width: 100%;
    }

    .col-lg-4,
    .col-lg-5,
    .col-lg-7,
    .col-lg-8 {
        margin-bottom: 20px;
    }

    /* Additional responsive utilities */
    .table-responsive {
        border: none;
    }

    .lead {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 575.98px) {
    body {
        font-size: 15px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .btn-simulate {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .custom-table th {
        font-size: 0.7rem;
        padding: 8px 3px;
    }

    .custom-table td {
        font-size: 0.75rem;
        padding: 6px 3px;
    }

    .benefit-item span {
        font-size: 0.9rem;
    }

    .navbar-logo {
        height: 30px;
    }

    .language-dropdown {
        font-size: 11px;
        padding: 4px 6px;
        min-width: 50px;
    }

    .navbar-toggler {
        padding: 3px 5px;
        font-size: 1rem;
    }

    /* Table scrolling for small screens */
    .custom-table {
        min-width: 400px;
    }

    .custom-table th,
    .custom-table td {
        min-width: 100px;
    }
}

/* Additional Mobile Utilities */
@media (max-width: 767.98px) {
    .mobile-center {
        text-align: center !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    /* Better touch targets for mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improved form inputs for mobile */
    .form-control {
        min-height: 44px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Better spacing for mobile lists */
    ul li {
        margin-bottom: 8px;
    }

    /* Mobile-friendly image sizing */
    img {
        max-width: 100%;
        height: auto;
    }
}