/* ============================================
   THREEDPHARMA - SHARED STYLES
   Matching reference site design exactly
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0B5ED7;   /* Brand Blue */
    --secondary-color: #6DBE45;  /* Brand Green */
    --accent-color: #2CB5A0;     /* Teal Accent */
    --text-color: #1F2937;       /* Dark text (keep readable) */
    --text-light: #6B7280;       /* Softer gray */
    --bg-color: #FFFFFF;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-2xl: 8rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    transition: all 0.3s ease;
}

.navbar.transparent {
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}


.navbar.scrolled .navbar-menu a {
    color: var(--text-color);
}

.navbar.scrolled .navbar-logo {
    color: var(--text-color);
}

.navbar.scrolled .navbar-logo img {
    opacity: 1;
    display: block;
}

.navbar.scrolled .navbar-cta {
    background: var(--text-color);
    color: white;
}

.navbar.scrolled .navbar-menu a:hover {
    color: var(--primary-color) !important;
}

/* Active page link styling */
.navbar-menu a.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}



.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu a {
    color: white !important;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
}

.navbar.transparent .navbar-menu a {
    color: white !important;
}

.navbar.scrolled .navbar-menu a {
    color: var(--text-color) !important;
}

.navbar-menu a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.navbar.scrolled .navbar-menu a:hover {
    color: var(--primary-color) !important;
}

.navbar-cta {
    background: white;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.navbar-cta:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.navbar.scrolled .navbar-cta {
    background: var(--text-color);
    color: white;
}

.navbar.scrolled .navbar-cta:hover {
    background: var(--secondary-color);
}

.navbar-logo {
    color: white;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-logo img {
    height: 100px;
    width: auto;
    display: block;
    opacity: 1;
}

.navbar.scrolled .navbar-logo img {
    opacity: 1;
    display: block;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: white;
    z-index: 1001;
    position: relative;
}

.navbar.scrolled .mobile-menu-btn {
    color: var(--text-color);
}

.mobile-menu-dropdown {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border-color);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-dropdown.active {
    max-height: 90vh;
    padding: 2rem 1.5rem 2.5rem 1.5rem;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-dropdown li {
    margin-bottom: 1rem;
}

.mobile-menu-dropdown a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s ease;
}

.mobile-menu-dropdown a:hover {
    color: var(--secondary-color);
}

.mobile-menu-dropdown .mobile-cta {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-top: 2px solid var(--border-color);
    position: sticky;
    bottom: 0;
    background: white;
}

.mobile-menu-dropdown .mobile-cta a {
    display: block;
    background: var(--text-color);
    color: white;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-menu-dropdown .mobile-cta a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.navbar-logo img {
    height: 65px;
    width: auto;
    display: block;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 120vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

@keyframes heroBackgroundAnimation {
    0% {
        background-size: 100% 100%;
        background-position: center center;
    }
    50% {
        background-size: 110% 110%;
        background-position: 50% 50%;
    }
    100% {
        background-size: 100% 100%;
        background-position: center center;
    }
}

/* Hero with background image: cover, no-repeat, animated */
.hero.hero-bg-image {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    animation: heroBgFloat 20s ease-in-out infinite;
}

@keyframes heroBgFloat {
    0%, 100% { background-position: 50% 50%; }
    25% { background-position: 55% 48%; }
    50% { background-position: 52% 54%; }
    75% { background-position: 48% 52%; }
}

.hero-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/bg_img_top.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.05;
    z-index: 1;             
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    width: 100%;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.hero-cta {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(11, 94, 215, 0.3);
}

.hero-cta:hover {
    background: #084298;  /* darker brand blue */
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(11, 94, 215, 0.4);
}

.hero-image {
    display: none;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(11, 94, 215, 0.12);
    border-color: var(--accent-color);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.card-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   FEATURE LIST
   ============================================ */

.feature-list {
    list-style: none;
    display: grid;
    gap: var(--spacing-md);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.feature-item:hover {
    background: var(--bg-light);
}

.feature-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-item-description {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: #084298;  /* darker brand blue */
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
    border-color: var(--secondary-color);
    background: rgba(109, 190, 69, 0.1);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

.footer-description {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

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

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.footer-links a {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    color: var(--text-light);
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.footer-social-icon {
    display: block;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-lg);
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    
    .navbar-cta {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .hero {
        min-height: 120vh;
        padding-top: 0;
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .hero-content p {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
    
    .navbar-container {
        padding: 1rem 1.5rem;
    }
    
    .navbar.transparent .navbar-menu a,
    .navbar.transparent .navbar-logo {
        color: white;
    }
    
    .navbar-logo {
        font-size: 1.125rem;
    }
    
    .navbar-logo img {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .section-container {
        padding: 0 1.5rem;
    }
    
    .hero-container {
        padding: 0 1.5rem;
    }
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25D366;
    color: white;
    border-radius: 50px;
    padding: 0.75rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    overflow: hidden;
    width: 50px;
    height: 50px;
    justify-content: center;
}

.whatsapp-float:hover {
    width: auto;
    padding: 1rem 1.5rem;
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
    transform: translateY(-2px);
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: white;
}

.whatsapp-text {
    white-space: nowrap;
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.whatsapp-float:hover .whatsapp-text {
    opacity: 1;
    width: auto;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        padding: 0.75rem;
    }
    
    .whatsapp-icon {
        width: 22px;
        height: 22px;
    }
    
    .whatsapp-float:hover {
        width: auto;
        padding: 0.75rem 1.25rem;
    }
    
    .whatsapp-text {
        font-size: 0.875rem;
    }
}

/* ============================================
   DIGITAL AUDIT LIBRARY FLOATING BUTTON
   ============================================ */

.audit-library-float {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    padding: 0.75rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(11, 94, 215, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    overflow: hidden;
    width: 50px;
    height: 50px;
    justify-content: center;
}

.audit-library-float:hover {
    width: auto;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 6px 30px rgba(11, 94, 215, 0.5);
    transform: translateY(-50%) translateX(-4px);
}

.audit-library-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: white;
}

.audit-library-text {
    white-space: nowrap;
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.audit-library-float:hover .audit-library-text {
    opacity: 1;
    width: auto;
}

@media (max-width: 768px) {
    .audit-library-float {
        right: 1.5rem;
        width: 48px;
        height: 48px;
        padding: 0.75rem;
    }
    
    .audit-library-icon {
        width: 22px;
        height: 22px;
    }
    
    .audit-library-float:hover {
        width: auto;
        padding: 0.75rem 1.25rem;
        transform: translateY(-50%) translateX(-4px);
    }
    
    .audit-library-text {
        font-size: 0.875rem;
    }
}

/* ============================================
   FLOATING BUTTONS: HIDE WHILE SCROLLING
   ============================================ */
body.floating-btns-scrolling .whatsapp-float,
body.floating-btns-scrolling .audit-library-float {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
