/* ===============================================
   KARDERA - HERO LAYOUT
   =============================================== */

/* HERO SECTION BASE */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    color: var(--white);
    overflow: hidden;
}

.promo-hero {
    background: var(--gradient-primary);
    height: 100vh; /* Exact one screen height */
    position: relative;
    overflow: hidden; /* Keep hidden to maintain clean edges */
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.promo-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-80);
    z-index: 1;
}

.promo-hero::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--accent-10);
    border-radius: 50%;
    z-index: 1;
}

.promo-hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center; /* Back to center for better distribution */
    justify-content: center;
    padding-top: 80px; /* Account for fixed navbar */
    padding-bottom: 80px; /* Adequate bottom padding */
    box-sizing: border-box; /* Include padding in height calculation */
}

/* HERO DECORATIVE ELEMENTS */
.hero-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.hero-decoration:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.hero-decoration:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: -2s;
}

.hero-decoration:nth-child(3) {
    bottom: 20%;
    left: 15%;
    width: 150px;
    height: 150px;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* HERO CONTENT */
.hero-content {
    position: relative;
    z-index: 2;
    padding: 1rem 0; /* Reduced padding to save space */
    width: 100%;
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top */
    min-height: 0; /* Allow content to shrink */
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: var(--font-weight-800);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.hero .lead {
    font-size: 1.3rem;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

/* HERO IMAGE */
.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

/* HERO RESPONSIVE */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
        padding: 3rem 0;
    }

    .promo-hero {
        min-height: 100vh;
        padding: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* ===============================================
   HERO SPECIFIC COMPONENTS
   =============================================== */

/* HERO LOGO */
.hero-logo-container {
    text-align: center;
    padding: 0;
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem; /* More compact for wider container */
}

.hero-logo {
    max-width: 160px; /* Smaller logo for better fit */
    max-height: 100px; /* Smaller logo for better fit */
    height: auto;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: brightness(0) invert(1) drop-shadow(0 10px 20px rgba(0,0,0,0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* HERO TITLE */
.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem); /* Slightly larger with wider container */
    font-weight: var(--font-weight-800);
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 0.5rem; /* More compact spacing */
    letter-spacing: var(--letter-spacing);
    line-height: 1.1;
}

/* HERO BRAND NAME */
.hero-brand-name {
    margin-bottom: 1.25rem; /* Compact spacing */
}

.brand-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--black);
    padding: 0.6rem 1.5rem; /* Reduced padding for compactness */
    border-radius: 50px;
    font-size: 1.2rem; /* Reduced font size */
    font-weight: var(--font-weight-800);
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--accent);
    animation: brandPulse 2s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* HERO SUBTITLE */
.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem); /* Slightly larger with wider container */
    font-weight: var(--font-weight-600);
    color: var(--white);
    text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
    margin-bottom: 0.75rem; /* Compact spacing */
    line-height: var(--line-height);
}

/* HERO DESCRIPTION */
.hero-description {
    font-size: clamp(1rem, 1.8vw, 1.2rem); /* Slightly larger with wider container */
    color: var(--white);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem; /* Compact spacing */
    max-width: 800px; /* Wider max-width for better text flow */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    opacity: 0.95;
}

/* PROMO BADGES */
.promo-badges {
    margin-bottom: 1.5rem; /* Compact spacing with wider container */
}

.promo-badge-item {
    background: rgba(255,255,255,0.95);
    color: var(--black);
    padding: 1rem 0.75rem; /* Reduced padding for compactness */
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.promo-badge-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    background: var(--white);
}

.promo-badge-item:hover i {
    color: var(--white) !important;
    transform: scale(1.1);
}

.promo-badge-item i {
    font-size: 2.5rem !important;
    color: #F2B705 !important;
    margin-bottom: 0.5rem;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.badge-text {
    font-size: 0.8rem; /* Reduced font size */
    font-weight: 600;
    color: var(--black);
    line-height: 1.2; /* Tighter line height */
}

.badge-text strong {
    color: var(--primary);
    font-weight: 800;
}

/* HERO CTA */
.hero-cta {
    margin-top: 0; /* Remove extra top margin as promo-badges already has bottom margin */
}

/* HERO RESPONSIVE ENHANCEMENTS */
@media (max-width: 768px) {
    .promo-hero {
        height: 100vh; /* Keep exact one screen */
    }
    
    .promo-hero .container {
        height: 100%;
        padding-top: 70px; /* Account for mobile navbar */
        padding-bottom: 30px; /* Reduced bottom padding */
        box-sizing: border-box;
    }
    
    .hero-logo-container {
        margin-bottom: 1.5rem; /* Reduced spacing for mobile */
    }
    
    .hero-logo {
        max-width: 120px; /* Smaller mobile logo */
        max-height: 80px;
    }
    
    .hero-title {
        font-size: 1.6rem; /* Smaller mobile title */
        margin-bottom: 0.75rem; /* Tighter spacing for mobile */
    }
    
    .hero-brand-name {
        margin-bottom: 1.5rem; /* Reduced from 2rem */
    }
    
    .brand-badge {
        font-size: 1rem; /* Smaller mobile badge */
        padding: 0.5rem 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem; /* Smaller mobile subtitle */
        margin-bottom: 1rem; /* Slightly reduced */
    }
    
    .hero-description {
        font-size: 0.9rem; /* Smaller mobile description */
        margin-bottom: 2rem; /* Reduced from 2.5rem */
    }
    
    .promo-badges {
        margin-bottom: 2rem; /* Reduced spacing for mobile */
    }
    
    .promo-badge-item {
        padding: 0.75rem 0.5rem; /* Tighter padding for mobile */
    }
    
    .promo-badge-item i {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem;
        color: #F2B705 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .badge-text {
        font-size: 0.75rem; /* Smaller mobile badge text */
    }
}

@media (max-width: 576px) {
    .promo-hero .container {
        height: 100%;
        padding-top: 60px; /* Compact mobile navbar */
        padding-bottom: 20px; /* Very compact bottom spacing */
        box-sizing: border-box;
    }
    
    .hero-logo-container {
        margin-bottom: 1rem; /* Even tighter for small screens */
    }
    
    .hero-logo {
        max-width: 100px; /* Very compact logo */
        max-height: 70px;
    }
    
    .hero-title {
        font-size: 1.4rem; /* Smaller small screen title */
        margin-bottom: 0.5rem; /* Minimal spacing */
    }
    
    .hero-brand-name {
        margin-bottom: 1rem; /* Minimal spacing */
    }
    
    .brand-badge {
        font-size: 0.9rem; /* Smaller badge */
        padding: 0.4rem 1rem;
        letter-spacing: 1px;
    }
    
    .hero-subtitle {
        font-size: 0.9rem; /* Smaller subtitle */
        margin-bottom: 0.75rem;
    }
    
    .hero-description {
        font-size: 0.8rem; /* Smaller description */
        margin-bottom: 1.5rem; /* Compact spacing */
    }
    
    .promo-badges {
        margin-bottom: 1.5rem; /* Compact spacing */
    }
    
    .promo-badge-item {
        padding: 0.5rem 0.25rem; /* Very compact for small screens */
    }
    
    .promo-badge-item i {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem;
        color: #F2B705 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .badge-text {
        font-size: 0.7rem; /* Very small text */
    }
}

/* PAGE HEADER */
.page-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 4rem 0 3rem; /* Reduced padding, using margin-top instead */
    margin-top: 75px; /* Offset for fixed navbar */
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../../images/hero/hero-bg.svg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: var(--white) !important;
    font-weight: var(--font-weight-800) !important;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--white) !important;
    opacity: 0.95;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* PAGE HEADER RESPONSIVE */
@media (max-width: 768px) {
    .page-header {
        padding: 3.5rem 0 2.5rem; /* Reduced padding for tablet */
        margin-top: 70px; /* Slightly less margin for tablet */
    }
    
    .page-header h1 {
        font-size: 2.5rem !important;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 3rem 0 2rem; /* Reduced padding for mobile */
        margin-top: 65px; /* Optimized margin for mobile navbar */
    }
    
    .page-header h1 {
        font-size: 2rem !important;
        letter-spacing: -0.25px;
    }
    
    .page-header p {
        font-size: 1rem;
        opacity: 0.9;
    }
}

/* BREADCRUMB IN PAGE HEADER */
.page-header .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
}

.page-header .breadcrumb-item {
    color: var(--white);
}

.page-header .breadcrumb-item.active {
    color: var(--accent);
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

/* NAVBAR Z-INDEX MANAGEMENT */
.navbar.fixed-top {
    z-index: 1030; /* Bootstrap default for fixed navbar */
}

/* PAGE HEADER Z-INDEX */
.page-header {
    z-index: 1; /* Below navbar */
}

.page-header .container {
    z-index: 2; /* Content above background */
}

/* FORCE PROMO BADGE ICONS VISIBILITY - HERO SECTION */
.promo-hero .promo-badge-item i,
.hero-section .promo-badge-item i,
#home .promo-badge-item i {
    color: #F2B705 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    background: none !important;
    -webkit-text-fill-color: #F2B705 !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    font-size: 2.5rem !important;
}

/* Specific icons for promo badges */
.promo-badge-item .fa-clock,
.promo-badge-item .fa-dollar-sign,
.promo-badge-item .fa-shield-check,
.promo-badge-item .fa-shield-alt,
.promo-badge-item .fa-users {
    color: #F2B705 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* SHIELD-ALT ICON FOR PROMO BADGES */
.promo-badge-item .fa-shield-alt {
    color: #F2B705 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.promo-badge-item:hover .fa-shield-alt {
    color: var(--white) !important;
}

/* Override any conflicting styles */
.promo-badges .promo-badge-item i {
    color: #F2B705 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    font-size: 2.5rem !important;
}
