/* ============================================
   Hematsb.com - Hemat Marine Sdn Bhd
   Custom CSS: animations, layout, hover effects
   Bootstrap 5.3 base + custom styles
   ============================================ */

:root {
    --primary: #0a1628;
    --secondary: #1a3a5c;
    --accent: #17a2b8;
    --accent-light: #9bd6e8;
    --text-dark: #212529;
    --text-secondary: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --font-sans: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 40px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background-color: var(--bg-light); color: var(--text-dark); line-height: 1.6; margin: 0; padding: 0; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; line-height: 1.3; color: var(--text-dark); }

.section-title { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; color: var(--text-dark); margin-bottom: 1rem; line-height: 1.25; }
.section-subtitle { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.5rem; }

/* ===== Navbar ===== */
.navbar-logo { height: 40px; width: auto; object-fit: contain; }
.nav-link { font-family: var(--font-sans); font-weight: 500; font-size: 0.9375rem; padding: 0.5rem 0.875rem; border-radius: var(--radius-sm); transition: var(--transition); position: relative; }
.nav-link:hover, .nav-link.active { color: #fff; background-color: rgba(255,255,255,0.1); }
.nav-link.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 20px; height: 3px; background: var(--accent); border-radius: 2px; }
.dropdown-menu { border: none; box-shadow: var(--shadow-lg); border-radius: var(--radius-md); padding: 0.5rem 0; margin-top: 0.25rem; font-size: 0.9375rem; }
.dropdown-item { padding: 0.5rem 1.25rem; font-weight: 500; transition: var(--transition); border-radius: var(--radius-sm); }
.dropdown-item:hover { background-color: rgba(23,162,184,0.08); color: var(--accent); }
.contact-btn-nav { font-family: var(--font-sans); font-weight: 600; font-size: 0.8125rem; }
.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

/* ===== Hero ===== */
.hero-section { background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 50%, #0d2137 100%); position: relative; overflow: hidden; min-height: 100vh; }
.hero-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at 20% 50%, rgba(23,162,184,0.06) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%); pointer-events: none; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,255,255,0.015) 50px, rgba(255,255,255,0.015) 51px); pointer-events: none; }
.hero-logo { height: 120px; width: auto; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); transition: var(--transition); }
.hero-logo:hover { transform: scale(1.05); filter: drop-shadow(0 6px 20px rgba(23,162,184,0.4)); }
.hero-title { font-family: var(--font-display); font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-divider { width: 80px; height: 2px; }
.hero-bg-img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; max-width: 600px; opacity: 0.12; filter: blur(2px); pointer-events: none; }
.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10; }
.btn-icon-social { transition: var(--transition); border: 1px solid rgba(255,255,255,0.3); }
.btn-icon-social:hover { background: rgba(255,255,255,0.15) !important; border-color: rgba(255,255,255,0.6); transform: translateY(-2px); }

/* ===== Animations ===== */
@keyframes fadeInUp { 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 scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.animate-fade-in-up { opacity: 0; animation: fadeInUp 0.6s ease forwards; }
.animate-fade-in-left { opacity: 0; animation: fadeInLeft 0.6s ease forwards; }
.animate-fade-in-right { opacity: 0; animation: fadeInRight 0.6s ease forwards; }
.animate-scale-in { opacity: 0; animation: scaleIn 0.5s ease forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ===== Step Cards ===== */
.services-hero-section { background: var(--primary); position: relative; overflow: hidden; }
.step-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); transition: var(--transition); backdrop-filter: blur(4px); }
.step-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-number { background: var(--accent); color: var(--white); font-family: var(--font-display); box-shadow: 0 4px 12px rgba(23,162,184,0.3); transition: var(--transition); }
.step-card:hover .step-number { background: var(--accent-light); color: var(--primary); box-shadow: 0 6px 20px rgba(23,162,184,0.4); }

/* ===== Service Cards ===== */
.service-card { background: var(--white); border: 1px solid rgba(0,0,0,0.06); transition: var(--transition); position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; }
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(23,162,184,0.2); }
.service-icon { transition: var(--transition); width: 100%; height: 60px; }
.service-card:hover .service-icon { background: var(--accent); color: var(--white); transform: scale(1.1); }
.service-card h5 { font-family: var(--font-display); font-size: 1.125rem; transition: color 0.3s ease; }
.service-card:hover h5 { color: var(--accent); }
.service-icon svg { width: 28px; height: 28px; }

/* ===== Affiliate ===== */
.affiliate-section { background: var(--primary); padding: 3rem 0; }
.affiliate-section h3 { color: var(--white); }
.hover-scale { transition: transform 0.3s ease; display: inline-block; }
.hover-scale:hover { transform: scale(1.1) rotate(-2deg); }
.affiliate-img { max-height: 80px; object-fit: contain; transition: var(--transition); border-radius: var(--radius-sm); }
.affiliate-img:hover { transform: scale(1.1); filter: brightness(1.1); }

/* ===== Contact / Footer ===== */
.contact-section { background: var(--white); }
.map-container { transition: var(--transition); }
.map-container:hover { box-shadow: var(--shadow-xl); }
.contact-info p { line-height: 1.8; }
.footer-section { background: var(--primary); color: var(--white); padding: 2.5rem 0 1.5rem; }
.footer-brand { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--white); letter-spacing: 0.02em; }
.text-white-50 { color: rgba(255,255,255,0.75); }
.bg-white-25 { background-color: rgba(255,255,255,0.25); }

/* ===== Page elements ===== */
.page-header { margin-bottom: 2rem; }
.page-divider { width: 60px; height: 3px; background: var(--accent); margin-top: 0.5rem; border-radius: 2px; }
.service-nav { font-size: 0.875rem; color: var(--text-secondary); display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.service-nav a { color: var(--accent); font-weight: 500; transition: color 0.2s; }
.service-nav a:hover { color: #fff; }
.service-nav svg { color: var(--text-secondary); flex-shrink: 0; }
.reasons-grid { margin-top: 1.5rem; }
.reason-item { background: var(--bg-light); border-left: 3px solid var(--accent); transition: var(--transition); padding: 0.75rem 1rem; }
.reason-item:hover { background: rgba(23,162,184,0.04); border-left-color: var(--accent-light); transform: translateX(4px); }
.reason-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(23,162,184,0.1); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; transition: var(--transition); }
.reason-item:hover .reason-icon { background: var(--accent); color: var(--white); transform: scale(1.1); }
.service-image-row { margin-top: 2rem; }
.service-image-row img { transition: var(--transition); border-radius: 8px; }
.service-image-row img:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.narrative-card { background: var(--white); border: 1px solid rgba(23,162,184,0.15); transition: var(--transition); }
.narrative-card:hover { box-shadow: var(--shadow-md); border-color: rgba(23,162,184,0.3); }
.narrative-card img { border-radius: 8px; margin-top: 1rem; }
.faq-card { background: var(--white); border: 1px solid rgba(0,0,0,0.06); transition: var(--transition); }
.faq-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(23,162,184,0.2); }
.lead { font-size: 1.125rem; line-height: 1.7; }
.about-image-wrapper img { transition: var(--transition); border-radius: var(--radius-lg); }
.about-image-wrapper img:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.table-bordered { border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; }
.table thead { background-color: #f8f9fa; }
.table td, .table th { padding: 0.75rem 1rem; }
.alert { border-radius: 8px; }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .navbar-collapse { background: rgba(10,22,40,0.95); border-radius: 8px; padding: 0.75rem; margin-top: 0.5rem; }
    .hero-logo { height: 80px; }
    .hero-title { font-size: 1.5rem; }
    .hero-bg-img { display: none; }
    .intro-section .col-lg-6 { text-align: center; }
    .intro-section .col-lg-6 img { margin: 0 auto; }
    .contact-section .col-lg-5, .contact-section .col-lg-7 { text-align: center; }
    .contact-info { text-align: center; }
    .footer-section .col-md-4 { text-align: center; margin-bottom: 1rem; }
    .footer-section .col-md-4:last-child { text-align: center; }
    .footer-section .row.text-center.text-md-start { text-align: center; }
}
@media (max-width: 575.98px) {
    .hero-title { font-size: 1.25rem; }
    .hero-logo { height: 60px; }
    .section-title { font-size: 1.5rem; }
    .step-card { padding: 1.5rem 1rem; }
    .btn-icon-social { padding: 0.5rem; }
}
