/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Afghanistan Flag Inspired Palette */
    --primary-red: #B22222;        /* deep crimson red */
    --secondary-red: #E74C3C;      /* accent lighter red */
    --primary-green: #006400;      /* deep Afghan green */
    --secondary-green: #1ABC9C;    /* vibrant accent green */
    --primary-dark: #0B0B0B;       /* rich matte black */
    --text-dark: #222;             /* neutral readable black */
    --text-light: #888;            /* smooth gray */
    --bg-light: #F6F6F6;           /* very soft background */
    --white: #FFFFFF;
    --white2: #EFEFEF;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optional gradient helpers */
:root {
    --accent-gradient: linear-gradient(135deg, var(--primary-red), var(--primary-green));
    --header-gradient: linear-gradient(135deg, var(--primary-dark), #1A1A1A);
    --button-gradient: linear-gradient(135deg, var(--primary-red), var(--secondary-green));
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===================================
   Header & Navigation
   =================================== */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-gradient);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.top-bar {
    background: var(--primary-red);
    padding: 5px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.contact-quick a {
    color: var(--white);
    margin-right: 20px;
    transition: var(--transition);
}

.contact-quick a:hover {
    opacity: 0.8;
}

nav {
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
	    text-transform: uppercase;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-red);
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
}


.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--white);
    margin: 4px 0;
    transition: var(--transition);
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2d2d2d 100%);
    padding: 80px 30px 30px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-overlay .nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: flex-start;
    list-style: none;
}

.mobile-menu-overlay .nav-links li {
    width: 100%;
}

.mobile-menu-overlay .nav-links a {
    color: white;
    font-size: 18px;
    padding: 10px 0;
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
}

/* ===================================
   Container & Utilities
   =================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.section-title.visible {
  animation: zoomIn 1s ease-out forwards;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
	
    background: linear-gradient(135deg, var(--primary-red), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* for Firefox */
    color: transparent;	
	
	opacity: 0; /* start hidden */
	transform: scale(0.8);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-green));
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 165, 114, 0.6);
}

.btn-primary {
    background: var(--button-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(197, 165, 114, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 165, 114, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-secondary:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* ===================================
   Page Header
   =================================== */

.page-header {
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(197, 165, 114, 0.6));
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.page-header h1 {
    font-size: 52px;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 15px;
	animation: fadeInUp 1s ease-out;
}

.page-header p {
    font-size: 20px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out;	
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    min-height: 90vh;
    background-image: url("../images/khyberfx_family_happiness.jpg"); /* Default for laptops/desktops */
    background-position: right top ;
    background-size:cover;
    background-repeat: no-repeat;
    display: flex;
	align-items: flex-start; /* move content to top */
    justify-content: center;
    padding-top: 12vh; /* adjust as needed */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 1000px;
    animation: fadeInUp 1s ease-out;
	flex:1;
	min-width: 280px;
}

.hero h1 {
    font-size: 62px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 24px;
    margin-bottom: 35px;
    opacity: 0.95;
	color:#2A0000;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ===================================
   Cards & Features
   =================================== */

.card {
    background: var(--white);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    height: 100%;
}

.card-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-red), var(--primary-green));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-icon svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

.card:hover .card-icon {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.card h3 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 15px;
    text-align: center;
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
    text-align: center;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* ===================================
   Glassmorphism Effects
   =================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Rates Widget
   =================================== */

.rates-widget {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 40px;
    color: var(--white);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rate-item:last-child {
    border-bottom: none;
}

.rate-currency {
    display: flex;
    align-items: center;
    gap: 15px;
}

.flag-icon {
    width: 35px;
    height: 25px;
    border-radius: 4px;
    font-size: 24px;
}

.rate-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-red);
}

/* ===================================
   Quick Quote Popup
   =================================== */

.quick-quote-trigger {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(197, 165, 114, 0.5);
    z-index: 998;
    transition: var(--transition);
}

.quick-quote-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(197, 165, 114, 0.7);
}

.quick-quote-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: popupFadeIn 0.3s ease-out;
}

.quick-quote-popup.active {
    display: block;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-overlay.active {
    display: block;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.popup-close:hover {
    color: var(--primary-dark);
}

/* ===================================
   WhatsApp Float Button
   =================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--white);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.5);
    cursor: pointer;
    z-index: 997;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.7);
}

/* ===================================
   Forms
   =================================== */

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===================================
   Footer
   =================================== */

footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0d0d0d 100%);
    color: var(--white);
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: var(--primary-red);
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 6px;
}


.footer-section a {
    color: #ccc;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
	font-size:12px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-green);
    transform: translateY(-3px);
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 968px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .page-header h1 {
        font-size: 38px;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .hero {
        min-height: 50vh;
		 background-image: url("../images/khyberfx_family_happiness_mobile.jpg"); 
        background-position: center top;
        background-size: cover;       /* ensures the image fills the area */
        background-repeat: no-repeat; /* prevents tiling */
		padding-top:2px;
    }
	
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float,
    .quick-quote-trigger {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .quick-quote-trigger {
        bottom: 80px;
        right: 20px;
    }
    
    .whatsapp-float {
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .page-header h1 {
        font-size: 30px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* ===================================
   Scroll to Top Button
   =================================== */

#scrollTopBtn {
    position: fixed;
    bottom: 170px; /* Adjust to sit just above .quick-quote-trigger (100px) and .whatsapp-float (30px) */
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-green));
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(197, 165, 114, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 996;
}

#scrollTopBtn.show {
    opacity: 1;
    pointer-events: auto;
    animation: fadeInUp 0.4s ease-out;
}

#scrollTopBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(197, 165, 114, 0.7);
}

/* Responsive: smaller button for mobile */
@media (max-width: 768px) {
    #scrollTopBtn {
        width: 50px;
        height: 50px;
        bottom: 140px;
        right: 20px;
    }
}


.mission-vision-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.15), rgba(197,165,114,0.05));
    border-left: 5px solid #B22222;
    border-radius: 18px;
    padding: 35px 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: all 0.35s ease;
    opacity: 0.97;
    transform: translateY(0);
    position: relative;
    overflow: hidden;
}

/* subtle light glow on hover */
.mission-vision-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, rgba(197,165,114,0.25), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 18px;
}

.mission-vision-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    opacity: 1;
}

.mission-vision-card:hover::before {
    opacity: 1;
}

/* optional inner typography style */
.mission-vision-card h3 {
    color: #B22222;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.mission-vision-card p {
    color: #333;
    font-size: 15.5px;
    line-height: 1.7;
}


.business-solution {
  background: linear-gradient(145deg, rgba(197,165,114,0.08), rgba(255,255,255,0.05));
  border-radius: 16px;
  padding: 30px 25px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: all 0.35s ease;
  transform: scale(0.97);
  opacity: 0.95;
}

.business-solution:hover {
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* ============ */
.services-section {
  padding: 80px 20px;
  background: var(--bg-light);
}

.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
  transition: all 0.3s ease;
}

.service-block img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.service-block img:hover {
  transform: scale(1.03);
}

.service-text h2 {
  font-size: 36px;
  color: var(--primary-dark);
  margin-bottom: 25px;
}

.service-text p {
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-text ul {
  list-style: none;
  margin-bottom: 30px;
  padding-left: 0;
}

.service-text li {
  padding: 12px 0;
  font-size: 16px;
  color: var(--text-light);
  border-bottom: 1px solid #eee;
}

.service-text li i {
  color: var(--primary-red);
  margin-right: 12px;
}

.service-badge {
  display: inline-block;
  background: var(--primary-red);
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.service-block.reverse {
  direction: rtl;
}

.service-block.reverse > * {
  direction: ltr;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .service-block {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
  }

  .service-block.reverse {
    direction: ltr;
  }

  .service-text {
    text-align: left;
  }

  .service-text h2 {
    font-size: 28px;
  }

  .service-text p {
    font-size: 16px;
  }
}

/* ================*/

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex-wrap: wrap;
}

.hero-logo {
    flex: 1;
    min-width: 200px;
    text-align: right;
    opacity: 0;
	zoomIn 1s ease-out forwards;
    /*animation: fadeInLogo 1.5s ease forwards;*/
	animation: fadeInUp 1.5s ease forwards;
    animation-delay: 0.8s; /* delay for smooth effect */
}

.hero-logo img {
    max-width: 100%;
    height: auto;
}

/* Fade-in keyframes */
@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    .hero-logo {
        text-align: center;
        margin-top: 20px;
    }
}