/* ===========
   EPSee Global Styles
   =========== */

:root {
    /* Brand */
    --primary-color: #0F2A45;   /* EPSee navy */
    --accent-gold:  #DAA945;    /* EPSee gold */

    --navbar-bg:    #0F2A45;

    /* Utility colours (Bootstrap aligned) */
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color:  #dc3545;
}

/* Layout */
html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure main grows to fill height between navbar and footer */
main.flex-fill {
    flex: 1;
}

/* ===========
   Navbar
   =========== */

.epsee-navbar {
    background-color: var(--navbar-bg);
    z-index: 1030; /* Ensure navbar stays above all content */
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 2.5rem;
}

.navbar-brand-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    color: #ffffff;
}

.navbar-brand-text {
    letter-spacing: 0.5px;
}

.navbar-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.85);
    margin-top: -2px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #ffffff;
}

.navbar-cta {
    border-radius: 999px;
    font-weight: 600;
    padding-inline: 1rem;
}

/* ===========
   CSS Logo (Eye Icon)
   =========== */

/* Shared eye mark used in navbar & footer */
.custom-eye {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
}

.custom-eye .eye-outline {
    font-size: 1em;
    color: #ffffff; /* default: white (navbar) */
}

/* Flat gold pupil */
.custom-eye .eye-iris {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.4em;
    height: 0.4em;
    background-color: var(--accent-gold);
    border-radius: 50%;
}

/* Footer variant: darker outline on light background */
.site-footer .custom-eye .eye-outline {
    color: #333333;
}

/* ===========
   EPC Rating Badges
   =========== */

.rating-badge {
    font-weight: bold;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.rating-A { background: #28a745; color: #ffffff; }
.rating-B { background: #20c997; color: #ffffff; }
.rating-C { background: #17a2b8; color: #ffffff; }
.rating-D { background: #ffc107; color: #212529; }
.rating-E { background: #fd7e14; color: #ffffff; }
.rating-F { background: #dc3545; color: #ffffff; }
.rating-G { background: #6c757d; color: #ffffff; }

/* ===========
   Footer
   =========== */

.site-footer a {
    color: inherit;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ===========
   Landing Page Premium Styles
   =========== */

/* Hero gradient background - lighter, more modern */
.hero-bg {
    background: linear-gradient(
        135deg,
        #1e3a5f 0%,
        #2c5282 100%
    );
}

/* Consistent icon sizing for section headers */
.section-icon {
    font-size: 1.4rem;
}

/* Smooth fade-in animations for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger animation delays for multiple cards */
.animate-fade-in:nth-child(1) { animation-delay: 0.1s; opacity: 0; }
.animate-fade-in:nth-child(2) { animation-delay: 0.2s; opacity: 0; }
.animate-fade-in:nth-child(3) { animation-delay: 0.3s; opacity: 0; }
.animate-fade-in:nth-child(4) { animation-delay: 0.4s; opacity: 0; }

/* ===========
   Mobile Responsive Tables
   =========== */

/* Table wrapper for horizontal scroll on mobile */
.table-responsive-mobile {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure minimum touch target sizes on mobile */
@media (max-width: 768px) {
    .table-responsive-mobile table {
        min-width: 600px;
    }

    /* Larger buttons and links for touch */
    .btn, .nav-link, a.dropdown-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Stack table rows as cards on very small screens */
    .table-card-mobile {
        display: block;
        width: 100%;
    }

    .table-card-mobile thead {
        display: none;
    }

    .table-card-mobile tbody,
    .table-card-mobile tr {
        display: block;
        margin-bottom: 1rem;
    }

    .table-card-mobile tr {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0.75rem;
        background: white;
    }

    .table-card-mobile td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }

    .table-card-mobile td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
    }
}
