/* I CUBE ENGINEERING LLP - Brand Styles */

/* Google Fonts Import - Russo One (similar to Pronave) and PT Sans */
@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ============================================
   BRAND COLOR VARIABLES (Matching Visiting Card)
   ============================================ */
:root {
    --brand-blue: #1a5ba8;        /* Primary Blue from visiting card */
    --brand-blue-dark: #14457a;   /* Darker blue for hover states */
    --brand-blue-light: #2a6fc4;  /* Lighter blue for accents */
    --brand-orange: #f58220;      /* Orange from visiting card */
    --brand-orange-dark: #d96e10; /* Darker orange for hover */
    --brand-white: #ffffff;
    --brand-gray: #333333;
}

/* General Setup */
body {
    background-color: var(--brand-white);
    color: var(--brand-gray);
    font-family: 'PT Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Brand Typography - Pronave style (using Russo One) */
.brand-heading,
.navbar-brand,
h1, h2, h3, h4.text-primary.fw-bold,
.display-4, .display-5 {
    font-family: 'Russo One', sans-serif !important;
    letter-spacing: 1px;
}

/* Tagline Typography - PT Sans with ORANGE color from visiting card */
.tagline,
.lead.text-muted,
p.lead.text-muted.fst-italic {
    font-family: 'PT Sans', sans-serif !important;
    font-style: italic;
    color: var(--brand-orange) !important; /* Vibrant Orange from visiting card */
}

/* Extra bold for hero section tagline - Using Russo One for maximum thickness */
#home .tagline strong {
    font-family: 'Russo One', sans-serif !important;
    font-weight: 400 !important; /* Russo One is naturally bold (400) */
    letter-spacing: 1px;
    font-size: 1.1em; /* Slightly larger to enhance boldness */
}

/* ============================================
   PRIMARY COLOR - BRAND BLUE (From Visiting Card)
   ============================================ */
.bg-primary {
    background-color: var(--brand-blue) !important;
}

.text-primary {
    color: var(--brand-blue) !important;
}

.border-primary {
    border-color: var(--brand-blue) !important;
}

.btn-primary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue-dark);
}

.btn-primary:hover {
    background-color: var(--brand-blue-dark);
    border-color: var(--brand-blue-dark);
}

/* Outline button with brand colors */
.btn-outline-primary {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

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

/* ============================================
   ACCENT COLOR - BRAND ORANGE (From Visiting Card)
   ============================================ */
.text-orange,
.text-accent {
    color: var(--brand-orange) !important;
}

.bg-orange,
.bg-accent {
    background-color: var(--brand-orange) !important;
}

.btn-orange {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange-dark);
    color: var(--brand-white);
}

.btn-orange:hover {
    background-color: var(--brand-orange-dark);
    border-color: var(--brand-orange-dark);
    color: var(--brand-white);
}

/* Navbar Tuning */
.navbar-brand i {
    color: #ffffff;
}

.nav-link {
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 5px;
}

/* SPA Section Hiding/Showing */
.page-section {
    display: none !important;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.page-section.active-section {
    display: block !important;
    opacity: 1;
    animation: fadeIn 0.6s;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ENHANCED SERVICES SECTION STYLING
   Inspired by Visiting Card Design
   ============================================ */

/* Services Section Background */
#services {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
    position: relative;
}

/* Service Cards - Premium Enhancement */
#services .card {
    border: none;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: 0 4px 20px rgba(26, 91, 168, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

#services .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-blue) 70%, var(--brand-orange) 70%, var(--brand-orange) 100%);
}

#services .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(26, 91, 168, 0.15);
}

/* Service Images - Arc Border Design (Like Visiting Card) */
#services .img-fluid {
    border-radius: 12px;
    position: relative;
    transition: transform 0.4s ease;
}

#services .card:hover .img-fluid {
    transform: scale(1.02);
}

/* Image Container with Arc Border */
#services .col-lg-5 {
    position: relative;
}

#services .col-lg-5::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 3px solid var(--brand-blue);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.2;
    z-index: -1;
}

/* Decorative Gear Icon Overlay */
#services h3::before {
    content: '⚙';
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 3rem;
    opacity: 0.05;
    color: var(--brand-blue);
}

/* Section Headings Enhancement */
#services h3.text-primary {
    position: relative;
    padding-left: 15px;
}

#services h3.text-primary::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-orange) 100%);
    border-radius: 2px;
}

/* Sub-headings Enhancement */
#services h5.text-primary {
    position: relative;
    padding-bottom: 8px;
    display: inline-block;
}

#services h5.text-primary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--brand-orange);
    border-radius: 1px;
}

/* List Enhancements */
#services ul {
    position: relative;
}

#services ul li {
    position: relative;
    padding-left: 5px;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

#services ul li:hover {
    transform: translateX(5px);
}

/* Alert Box Enhancement */
#services .alert {
    border-radius: 12px;
    border: none;
    border-left: 4px solid var(--brand-blue);
    background: linear-gradient(90deg, rgba(26, 91, 168, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Glass Alert Enhancement */
#services .glass-alert {
    background: linear-gradient(135deg, rgba(26, 91, 168, 0.03) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(26, 91, 168, 0.1);
    padding: 1.5rem;
}

/* Divider Enhancement */
#services hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--brand-blue) 20%, var(--brand-orange) 80%, transparent 100%);
    opacity: 0.3;
}

/* Row Hover Effects for Content Blocks */
#services .row:hover h5.text-primary {
    color: var(--brand-blue-dark) !important;
}

/* Floating Decorative Element */
#services .card-body {
    position: relative;
}

#services .card-body::after {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(26, 91, 168, 0.05) 0%, rgba(245, 130, 32, 0.05) 100%);
    border-radius: 50%;
    z-index: 0;
}

/* Typography Enhancements */
.text-justify {
    text-align: justify;
}


.card-title {
    margin-bottom: 20px;
}

/* Hero Section Background */
#home {
    background-color: #ffffff; /* revert to white or transparent if needed */
    position: relative;
    padding-top: 20px; /* Further reduced from 40px */
    padding-bottom: 80px; 
}

/* Glassmorphism Effect - Now Card Background */
.glass-panel {
    /* Image with lighter white overlay */
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('title-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Scroll based parallax effect */
    
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    padding: 8rem 4rem; 
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    margin-bottom: 3rem;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* New Attractive Styles - Updated with Brand Colors */
.text-gradient {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e8f0fa 0%, #d4e3f5 100%);
    color: var(--brand-blue);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(26, 91, 168, 0.15);
    transition: transform 0.3s ease;
}

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

.feature-card {
    border: none;
    border-radius: 12px;
    background: var(--brand-white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(26, 91, 168, 0.1);
}

.glass-alert {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ============================================
   WAVE PATTERN (Like Visiting Card)
   ============================================ */
.wave-section {
    position: relative;
    overflow: hidden;
}

.wave-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-blue) 60%, var(--brand-orange) 60%, var(--brand-orange) 100%);
    clip-path: ellipse(60% 100% at 50% 100%);
}

/* Footer Wave Design */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-blue) 70%, var(--brand-orange) 70%, var(--brand-orange) 100%);
}

/* Orange accent stripe */
.accent-stripe {
    height: 4px;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-blue) 65%, var(--brand-orange) 65%, var(--brand-orange) 100%);
}

/* Footer Links */
footer a.text-white:hover {
    color: var(--brand-orange) !important;
    text-decoration: underline !important;
}

/* Contact Address Link */
#contact a.text-dark:hover {
    color: var(--brand-blue) !important;
    text-decoration: underline !important;
}

/* --- Scroll Animations --- */

/* Base State: Hidden and shifted down */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

/* Visible State: Fully visible and in place */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delays (for grids/lists) */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Different Animation Directions (optional usage) */
.animate-left {
    transform: translateX(-30px);
}

.animate-right {
    transform: translateX(30px);
}

.animate-scale {
    transform: scale(0.9);
}

.animate-scale.is-visible {
    transform: scale(1);
}

/* ============================================
   3D IMAGES - SERVICES SECTION (RESPONSIVE)
   ============================================ */

/* Container for 3D images - Now inline with content */
.floating-3d-image {
    display: inline-block;
    position: relative;
    width: 100%;
    max-width: 250px;
    margin: 20px auto;
    text-align: center;
    will-change: transform;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.connecting-overlay-container {
    position: relative;
    z-index: 10;
    height: 0;
    text-align: center;
    overflow: visible;
    pointer-events: none;
}

.connecting-overlay-img {
    position: relative;
    top: -80px; /* Move up to overlap previous section */
    max-width: 300px;
    width: 60%;
    filter: drop-shadow(0 15px 30px rgba(26, 91, 168, 0.2));
    animation: float-gentle-2 8s ease-in-out infinite;
}

/* Responsive adjustment for connecting image */
@media (max-width: 768px) {
    .connecting-overlay-img {
        max-width: 180px;
        top: -60px;
    }
}

.floating-3d-image img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Individual animations and responsive sizing */
.floating-3d-image.float-1 {
    animation: float-gentle-1 8s ease-in-out infinite;
}

.floating-3d-image.float-2 {
    animation: float-gentle-2 10s ease-in-out infinite;
}

.floating-3d-image.float-3 {
    animation: float-gentle-3 9s ease-in-out infinite;
}

.floating-3d-image.float-4 {
    animation: float-gentle-4 11s ease-in-out infinite;
}

/* Gentle floating animations with 3D rotation */
@keyframes float-gentle-1 {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg) rotateX(3deg);
    }
    50% {
        transform: translateY(-15px) rotateY(5deg) rotateX(-3deg);
    }
}

@keyframes float-gentle-2 {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg) rotateZ(0deg);
    }
    50% {
        transform: translateY(-12px) rotateY(-5deg) rotateZ(2deg);
    }
}

@keyframes float-gentle-3 {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg) scale(1);
    }
    50% {
        transform: translateY(-18px) rotateY(8deg) scale(1.05);
    }
}

@keyframes float-gentle-4 {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg) rotateY(0deg);
    }
    50% {
        transform: translateY(-14px) rotateZ(3deg) rotateY(-5deg);
    }
}

/* Hover effect on images */
.floating-3d-image:hover img {
    transform: scale(1.1) rotateY(10deg);
    filter: drop-shadow(0 15px 40px rgba(26, 91, 168, 0.3));
}

/* Scroll-triggered effects */
.floating-3d-image.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

.floating-3d-image.scroll-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* 3D depth effect on services section */
#services {
    transform-style: preserve-3d;
    perspective: 2000px;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablets and below (768px and below) */
@media (max-width: 768px) {
    /* Make 3D images smaller and centered on tablets/mobile */
    .floating-3d-image {
        max-width: 180px;
        margin: 15px auto;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 0.9rem !important;
        letter-spacing: 0 !important;
    }
    
    .navbar-brand img {
        height: 40px !important;
        margin-right: 8px !important;
    }
    
    /* Glass panel - adjust padding */
    .glass-panel {
        padding: 8rem 2rem !important;
        min-height: 60vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-radius: 20px;
        margin-bottom: 2rem;
    }
    
    /* Heading sizes */
    .display-4 {
        font-size: 1.8rem !important;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    h1 {
        font-size: 1.6rem !important;
    }
    
    h2 {
        font-size: 1.4rem !important;
    }
    
    h3 {
        font-size: 1.2rem !important;
    }
    
    /* Tagline */
    .tagline {
        font-size: 0.95rem !important;
    }
    
    /* Lead text */
    .lead {
        font-size: 1rem !important;
    }
    
    /* Cards */
    .card-body {
        padding: 1.5rem !important;
    }
    
    /* Glass alert */
    .glass-alert {
        padding: 1.5rem !important;
    }
    
    /* Container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Mobile phones (576px and below) */
@media (max-width: 576px) {
    /* Make 3D images even smaller on mobile phones */
    .floating-3d-image {
        max-width: 120px;
        margin: 10px auto;
    }
    
    /* Navbar - make text smaller but visible */
    .navbar-brand {
        font-size: 0.85rem !important; /* Made visible again */
        white-space: normal; /* Allow wrapping if needed */
        max-width: 80%; /* Prevent overflow */
        display: flex;
        align-items: center;
    }
    
    .navbar-brand img {
        height: 35px !important; /* Slightly smaller logo */
        margin-right: 8px !important;
    }
    
    /* Glass panel - massive for mobile as requested */
    .glass-panel {
        padding: 7rem 1.5rem !important;
        min-height: 70vh; /* Takes up most of the screen */
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-radius: 16px;
        margin-bottom: 2rem;
        margin-left: -10px; /* Make it slightly wider than container */
        margin-right: -10px;
        width: auto;
    }
    
    /* Heading sizes - more compact */
    .display-4 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    .display-5 {
        font-size: 1.3rem !important;
    }
    
    h1 {
        font-size: 1.4rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
    
    h4 {
        font-size: 1rem !important;
    }
    
    h5 {
        font-size: 0.95rem !important;
    }
    
    /* Tagline - single line */
    .tagline {
        font-size: 0.85rem !important;
        white-space: nowrap;
    }
    
    /* Lead text */
    .lead {
        font-size: 0.9rem !important;
    }
    
    /* Small text */
    small, .small {
        font-size: 0.8rem !important;
    }
    
    /* Body text */
    p {
        font-size: 0.9rem;
    }
    
    /* Cards - tighter */
    .card-body {
        padding: 1rem !important;
    }
    
    .card-body.p-5 {
        padding: 1.25rem !important;
    }
    
    .card-body.p-4 {
        padding: 1rem !important;
    }
    
    /* Glass alert */
    .glass-alert {
        padding: 1rem !important;
        border-radius: 12px;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.5rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Hero section */
    #home {
        padding-top: 10px;
        padding-bottom: 40px;
    }
    
    /* Section headers */
    .text-center.mb-5 h2 {
        font-size: 1.4rem !important;
    }
    
    /* Lists */
    ul li {
        font-size: 0.9rem;
    }
    
    /* Images in cards */
    .img-fluid {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    footer {
        padding: 1rem 0 !important;
    }
    
    footer p, footer small {
        font-size: 0.8rem !important;
    }
    
    /* Contact section adjustments */
    .form-control {
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
}

/* Extra small devices (360px and below) */
@media (max-width: 360px) {
    .display-4 {
        font-size: 1.3rem !important;
    }
    
    /* Glass panel - massive for extra small mobile */
    .glass-panel {
        padding: 6rem 1rem !important;
        min-height: 60vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-radius: 12px;
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .tagline {
        font-size: 0.75rem !important;
    }
}
