/* ========================================
   Kalagan Landing Page - Custom Styles
   By Octal Group LLC
   ======================================== */

/* ========== Root Variables ========== */
:root {
    --primary-color: #0F172A;
    --primary-dark: #020617;
    --primary-light: #1E293B;
    --secondary-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --accent-color: #FBBF24;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --text-dark: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

section {
    position: relative;
    overflow: hidden;
}

/* ========== Preloader ========== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* ========== Navigation ========== */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo-img {
    height: 40px;
    margin-right: 0.75rem;
    transition: var(--transition);
}

.navbar-brand:hover .logo-img {
    transform: scale(1.1) rotate(5deg);
}

.brand-name {
    background: linear-gradient(135deg, var(--secondary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--text-dark);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ========== Hero Section ========== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--secondary-color) 100%);
    padding-top: 80px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

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

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.hero-stats .stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: white;
    transition: var(--transition);
}

.hero-stats .stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.hero-stats .stat-card i {
    font-size: 2rem;
    color: var(--warning-color);
}

.hero-stats .stat-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
}

.hero-stats .stat-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.btn-hover-scale {
    transition: var(--transition);
}

.btn-hover-scale:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.hero-image {
    position: relative;
}

.floating-animation {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating-card {
    position: absolute;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    animation: floatCard 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
}

.card-1 {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 30%;
    right: -5%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    left: -10%;
    animation-delay: 2s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator a {
    display: inline-block;
    color: white;
    font-size: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* ========== Section Headers ========== */
.section-header {
    margin-bottom: 3rem;
}

.badge {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    letter-spacing: 0.5px;
}

.bg-primary-soft {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.bg-success-soft {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-warning-soft {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-info-soft {
    background-color: rgba(59, 130, 246, 0.1);
}

.bg-danger-soft {
    background-color: rgba(239, 68, 68, 0.1);
}

.bg-accent-soft {
    background-color: rgba(251, 191, 36, 0.1);
}

.text-accent {
    color: var(--accent-color);
}

/* ========== Features Section ========== */
.features-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.feature-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--warning-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
    font-size: 2.5rem;
}

.feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list i {
    font-size: 1rem;
}

/* ========== Modules Section ========== */
.modules-section {
    padding: 6rem 0;
}

.module-row {
    padding: 2rem 0;
}

.module-content {
    position: relative;
}

.module-number {
    font-size: 5rem;
    font-weight: 800;
    color: rgba(79, 70, 229, 0.1);
    position: absolute;
    top: -30px;
    left: -20px;
    z-index: 0;
}

.module-content h3 {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.module-features {
    list-style: none;
    padding: 0;
}

.module-features li {
    padding: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
}

.module-features i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.module-image {
    position: relative;
}

.module-image::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2rem;
    opacity: 0.1;
    z-index: -1;
}

.hover-zoom {
    transition: var(--transition);
}

.hover-zoom:hover {
    transform: scale(1.02);
}

/* ========== Benefits Section ========== */
.benefits-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.benefit-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem;
    height: 100%;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.benefit-card:hover::before {
    opacity: 0.05;
}

.benefit-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.15) rotate(360deg);
}

.benefit-icon i {
    font-size: 2rem;
    color: white;
}

.benefit-card h5 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.benefit-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ========== CTA Section ========== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* ========== Contact Section ========== */
.contact-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.contact-info {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    height: 100%;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    color: white;
    font-size: 1.25rem;
}

.info-content h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-content p,
.info-content a {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.social-links {
    margin-top: 2rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 0.75rem;
    background: rgba(79, 70, 229, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-3px);
}

.contact-form-wrapper {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.contact-form .form-floating > .form-control,
.contact-form .form-floating > .form-select {
    padding: 1rem;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.1);
}

.contact-form label {
    color: var(--text-muted);
    font-weight: 500;
}

.contact-form .btn-primary {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.contact-form .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ========== Footer ========== */
.footer {
    background: linear-gradient(135deg, #1F2937, #111827);
    color: white;
}

.footer-widget h6 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
    color: var(--primary-light);
    margin-top: 0.25rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact a:hover {
    color: white;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-legal-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-legal-link:hover {
    color: white;
}

/* ========== Back to Top Button ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ========== Utilities ========== */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

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

.text-white-50 {
    color: rgba(255, 255, 255, 0.7);
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
    .hero-section {
        padding-top: 100px;
    }

    .hero-content {
        text-align: center;
        margin-bottom: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .floating-card {
        display: none;
    }

    .module-number {
        font-size: 3rem;
        top: -20px;
        left: -10px;
    }

    .module-content h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    .hero-stats .stat-card h3 {
        font-size: 2rem;
    }

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

    .features-section,
    .modules-section,
    .benefits-section,
    .contact-section {
        padding: 4rem 0;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== Print Styles ========== */
@media print {
    .navbar,
    .scroll-indicator,
    .back-to-top,
    .cta-section,
    .contact-section,
    .footer {
        display: none !important;
    }
}
