/* 
  Abdullah Alghamdi Law Firm 
  Main Stylesheet (V5 - Spacing & Refinements)
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

/* --- Reset & Variables --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #ffffff; 
  --color-secondary: #f9f9f9; 
  --color-dark: #111111; 
  --color-darker: #0a0a0a;
  --color-gold: #B8973A; 
  --color-gold-light: #d4b55b;
  --color-gold-dim: rgba(184, 151, 58, 0.1);
  --color-text: #333333;
  --color-text-muted: #666666;
  --font-main: 'Cairo', sans-serif;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main); background-color: var(--color-primary); color: var(--color-text);
  direction: rtl; overflow-x: hidden; line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { color: var(--color-dark); font-weight: 700; line-height: 1.3; }
.text-gold { color: var(--color-gold); }
.text-white { color: #ffffff !important; }
.text-center { text-align: center; }
.section-title { font-size: 2.8rem; margin-bottom: 1.5rem; font-weight: 800; }
.section-subtitle { font-size: 1.2rem; color: var(--color-text-muted); max-width: 800px; margin: 0 auto 3.5rem; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 90px 0; }
.bg-light { background-color: var(--color-secondary); }
.bg-dark { background-color: var(--color-dark); color: #fff; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #fff; }

.btn { display: inline-block; padding: 14px 35px; font-family: var(--font-main); font-size: 1rem; font-weight: 700; text-decoration: none; border: none; cursor: pointer; transition: var(--transition); border-radius: 4px; }
.btn-gold { background-color: var(--color-gold); color: var(--color-primary); }
.btn-gold:hover { background-color: var(--color-gold-light); transform: translateY(-4px); box-shadow: 0 10px 20px rgba(184, 151, 58, 0.3); }
.btn-outline { background-color: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-outline:hover { background-color: var(--color-primary); color: var(--color-dark); }
.btn-outline-dark { background-color: transparent; color: var(--color-dark); border: 2px solid var(--color-dark); }
.btn-outline-dark:hover { background-color: var(--color-dark); color: var(--color-primary); }

/* Header & Logos */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: var(--transition); padding: 25px 0; background-color: transparent; }
.header.scrolled { background-color: var(--color-primary); box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 5px 0; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
/* Logo size increased AGAIN as requested */
.logo img { height: 100px; transition: var(--transition); } 
.header.scrolled .logo img { height: 80px; }

.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; transform: translateY(-15px); transition: var(--transition); }
.header.scrolled .nav-links { transform: translateY(0); }
.nav-links a { text-decoration: none; color: var(--color-primary); font-weight: 600; font-size: 1rem; transition: var(--transition); position: relative; }
.header.scrolled .nav-links a { color: var(--color-dark); }
.header.always-dark.scrolled .nav-links a { color: var(--color-dark); }
.header.always-dark:not(.scrolled) .nav-links a { color: var(--color-primary); }
.nav-links a::after { content: ''; position: absolute; bottom: -5px; right: 0; width: 0; height: 2px; background-color: var(--color-gold); transition: var(--transition); }
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--color-gold) !important; }

.menu-btn { display: none; background: none; border: none; cursor: pointer; z-index: 1001; }
.menu-btn span { display: block; width: 25px; height: 3px; background-color: var(--color-primary); margin: 5px 0; transition: var(--transition); }
.header.scrolled .menu-btn span, .header.always-dark .menu-btn span { background-color: var(--color-dark); }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 600px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 1.5s ease-in-out, visibility 1.5s; z-index: 0; }
.slide.active { opacity: 1; visibility: visible; z-index: 1; }
.slide video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 17, 17, 0.6); z-index: 2; }
.hero-content { position: relative; z-index: 3; text-align: center; color: var(--color-primary); max-width: 800px; padding: 0 20px; }
.hero-content h1 { font-size: 4rem; margin-bottom: 25px; color: #ffffff; line-height: 1.4; }
.hero-content h1 span.text-gold { color: var(--color-gold); }
.hero-content p { font-size: 1.3rem; margin-bottom: 0; }
.hero-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 30px; flex-wrap: wrap; }
.hero-controls { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); cursor: pointer; transition: var(--transition); }
.dot.active { background-color: var(--color-gold); width: 30px; border-radius: 6px; }

/* General Animation Classes */
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.hover-float { transition: var(--transition); }
.hover-float:hover { transform: translateY(-10px); }

/* Floating animation keyframes for the badge */
@keyframes floatBadge {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* SVG Icons - Linear style */
.icon-svg { width: 40px; height: 40px; stroke: var(--color-gold); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: var(--transition); }
.icon-svg-lg { width: 60px; height: 60px; stroke: var(--color-gold); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: var(--transition); }
.hover-float:hover .icon-svg, .hover-float:hover .icon-svg-lg { transform: scale(1.1); stroke: var(--color-gold-light); }

/* Image Zoom Hover (For all designated images) */
.img-zoom-wrap { overflow: hidden; border-radius: 8px; position: relative; }
.img-zoom-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.img-zoom-wrap:hover img { transform: scale(1.08); }

/* About Preview */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-size: 2.8rem; margin-bottom: 25px; }
.about-text p { margin-bottom: 18px; color: var(--color-text-muted); font-size: 1.1rem; }
.about-image { position: relative; }
.experience-badge { position: absolute; bottom: -30px; right: -30px; background-color: var(--color-gold); color: #fff; padding: 25px 30px; text-align: center; border-radius: 8px; z-index: 10; animation: floatBadge 4s ease-in-out infinite; }
.experience-badge span { display: block; font-size: 3rem; font-weight: 900; line-height: 1; margin-bottom: 5px; }
.team-badge { position: absolute; bottom: -30px; left: -30px; background-color: var(--color-dark); color: #fff; padding: 20px 30px; text-align: center; border-radius: 8px; z-index: 10; animation: floatBadge 5s ease-in-out infinite; }
.team-badge span { display: block; font-size: 2.5rem; font-weight: 900; line-height: 1; margin-bottom: 5px; color: var(--color-gold); }

.image-banner { width: 100%; height: 350px; object-fit: cover; border-radius: 8px; margin-bottom: 50px; }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 40px; }

/* Vision, Mission, Ethics - Now using Goal Box style */
.vme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 20px; }

/* Reusing Goal Box Style for VME cards as requested */
.goal-box { text-align: center; padding: 40px 20px; border: 1px solid #eaeaea; border-radius: 8px; background: #fff; transition: var(--transition); }
.goal-box:hover { border-color: var(--color-gold); box-shadow: 0 15px 30px rgba(184, 151, 58, 0.15); transform: translateY(-10px); }
.goal-icon-wrap { width: 80px; height: 80px; background: var(--color-gold-dim); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; transition: var(--transition); }
.goal-box:hover .goal-icon-wrap { background: var(--color-gold); }
.goal-box:hover .goal-icon-wrap .icon-svg, .goal-box:hover .goal-icon-wrap .icon-svg-lg { stroke: #fff; }

/* Strategic Goals */
.goals-title-box { background: var(--color-gold); padding: 30px 60px; display: inline-block; border-radius: 8px; box-shadow: 0 10px 20px rgba(184, 151, 58, 0.3); transition: var(--transition); }
.goals-title-box:hover { transform: scale(1.05); }
.goals-title-box h2 { color: #fff; margin: 0; font-size: 2.2rem; }

.goals-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 50px; }

/* Sectors Slider (القطاعات) */
.slider-wrapper { position: relative; padding: 0 50px; margin-top: 20px; }
.sector-slider { display: flex; overflow-x: hidden; scroll-behavior: smooth; gap: 30px; padding: 20px 0; }
.sector-card { min-width: calc(33.333% - 20px); display: flex; flex-direction: column; justify-content: center; align-items: center; background: #fff; padding: 30px 20px; border-radius: 8px; border: 1px solid #eee; text-align: center; transition: var(--transition); flex-shrink: 0; }
.sector-card:hover { box-shadow: 0 15px 30px rgba(0,0,0,0.08); transform: translateY(-5px); border-color: var(--color-gold); }
.sector-card .icon-svg-lg { margin-bottom: 25px; }
.sector-card h3 { margin-bottom: 15px; }
.sector-card p { line-height: 1.5; color: #666; font-size: 0.95rem; max-width: 250px; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 45px; height: 45px; background: var(--color-gold); color: #fff; border: none; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; transition: var(--transition); box-shadow: 0 5px 15px rgba(184, 151, 58, 0.4); }
.slider-btn:hover { background: var(--color-dark); }
.slider-prev { right: 0; }
.slider-next { left: 0; }

/* 9-Item Services Grid (الخدمات) */
.nine-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 50px; }
.nine-service-item { background: var(--color-secondary); padding: 25px 20px; border-radius: 8px; display: flex; align-items: center; gap: 15px; border-right: 4px solid var(--color-gold); transition: var(--transition); }
.nine-service-item:hover { background: var(--color-primary); box-shadow: 0 10px 20px rgba(0,0,0,0.08); transform: translateX(-5px); }
.nine-service-item svg { width: 35px; height: 35px; stroke: var(--color-gold); fill: none; stroke-width: 1.5; flex-shrink: 0; transition: var(--transition); }
.nine-service-item:hover svg { transform: scale(1.2); }
.nine-service-item h4 { font-size: 1.15rem; margin: 0; color: var(--color-dark); }

/* Target Audience & Trust (Reverted Layout) */
.list-group { list-style: none; }
.list-group li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 18px; font-size: 1.15rem; color: var(--color-text-muted); }
.list-group li svg { width: 22px; height: 22px; stroke: var(--color-gold); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 5px; }

/* Competitive Advantage */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 20px; }
.value-item { text-align: center; padding: 40px 30px; background: #fff; border-radius: 8px; transition: var(--transition); }
.value-item:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(184, 151, 58, 0.15); }
.value-icon { width: 90px; height: 90px; margin: 0 auto 25px; border: 2px solid var(--color-gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.value-item:hover .value-icon { background: var(--color-gold); }
.value-item:hover .value-icon .icon-svg { stroke: #fff; transform: scale(1.1); }

/* Team Section */
.team-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

/* Contact Section */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background-color: var(--color-primary); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.05); }
.contact-info { background-color: var(--color-dark); color: #fff; padding: 60px 50px; }
.contact-info h3 { color: #fff; margin-bottom: 30px; font-size: 2rem; }
.info-item { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 30px; transition: var(--transition); }
.info-item:hover { transform: translateX(-5px); }
.contact-form { padding: 60px 50px; }
.form-group { margin-bottom: 25px; }
.form-control { width: 100%; padding: 18px; border: 1px solid #ddd; border-radius: 4px; font-family: var(--font-main); font-size: 1.05rem; transition: var(--transition); background-color: #f9f9f9; }
.form-control:focus { outline: none; border-color: var(--color-gold); background-color: #fff; }

/* Footer */
.footer { background-color: var(--color-darker); color: #ccc; padding: 70px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-logo img { height: 80px; margin-bottom: 25px; }
.footer-title { color: #fff; font-size: 1.3rem; margin-bottom: 25px; position: relative; padding-bottom: 12px; }
.footer-title::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background-color: var(--color-gold); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #ccc; text-decoration: none; transition: var(--transition); font-size: 1.05rem; }
.footer-links a:hover { color: var(--color-gold); padding-right: 8px; }
.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.95rem; }

/* Achievements List Styles */
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    background-color: var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}
.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: var(--color-gold-light);
    box-shadow: 0 8px 25px rgba(184, 151, 58, 0.4);
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Responsive Design */
@media (max-width: 992px) {
  .about-preview, .split-layout, .contact-wrapper, .team-preview { grid-template-columns: 1fr; gap: 40px; }
  .hero-content h1 { font-size: 3rem; }
  .sector-card { min-width: calc(50% - 15px); }
  .experience-badge { right: 0; bottom: -20px; }
  .team-badge { left: 0; bottom: -20px; }
  .about-image, .team-preview .img-zoom-wrap { margin: 0 10px 30px 10px; }
}
@media (max-width: 768px) {
  .nav-links { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background-color: var(--color-primary); flex-direction: column; padding: 80px 30px; box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: var(--transition); transform: none !important; }
  .nav-links.active { right: 0; }
  .nav-links a { color: var(--color-dark); }
  .menu-btn { display: block; }
  .menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background-color: var(--color-dark); }
  .menu-btn.active span:nth-child(2) { opacity: 0; }
  .menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); background-color: var(--color-dark); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 2.5rem; }
  .goals-title-box { padding: 25px 40px; }
  .sector-card { min-width: 100%; }
}
