/* ============================================
   HAFERM MEDIA - MODERN CORPORATE CREATIVE DESIGN
   ============================================ */

/* Local Font Faces */
@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter/Inter-VariableFont_slnt,wght.woff2') format('woff2-variations'),
         url('../assets/fonts/inter/Inter-VariableFont_slnt,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/fonts/inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --navy: #1a2332;
    --navy-light: #2d3e50;
    --navy-dark: #0f1825;
    
    /* Accent Colors */
    --gold: #4BC2C6;
    --gold-light: #4BC2C6;
    --gold-dark: #292929;
    --black: #292929;
    
    /* Neutral Colors */
    --white: #ffffff;
    --grey-light: #f5f7fa;
    --grey: #e1e8ed;
    --grey-dark: #6b7280;
    --black: #0a0a0a;
    
    /* Text Colors */
    --text-primary: #1a2332;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(26, 35, 50, 0.08);
    --shadow-md: 0 4px 16px rgba(26, 35, 50, 0.12);
    --shadow-lg: 0 8px 32px rgba(26, 35, 50, 0.16);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px; /* 17px for better readability */
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p {
    text-align: justify;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--grey);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: auto;
    height: 36px;
    max-width: 180px;
    max-height: 36px;
    object-fit: contain;
    display: block;
    -webkit-user-select: none;
    user-select: none;
    /* iOS Safari specific fixes */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-menu.active {
    display: flex;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15.2px;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--gold);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 26px;
    height: 2px;
    background: var(--navy);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: var(--text-light);
    padding: 180px 0 120px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--white);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
    color: var(--grey-light);
    font-weight: 400;
    line-height: 1.6;
    max-width: 540px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 16px 36px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.cta-button.primary {
    background: var(--gold);
    color: var(--navy);
}

.cta-button.primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(212, 175, 55, 0.3);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--navy);
    transform: translateY(-2px);
}

.hero-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    margin-bottom: 20px;
}

.section-header.centered {
    text-align: center;
}

.section-label {
    display: inline-block;
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18.4px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
    padding: 80px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text .lead {
    font-size: 19px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 16px;
    line-height: 1.4;
}

.about-text p {
    font-size: 16.8px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    /* Modern border with gradient */
    padding: 0px;
    background: linear-gradient(135deg, #4BC2C6, #3aa8ac, #4BC2C6);
    box-shadow: 0 10px 40px rgba(75, 194, 198, 0.2), var(--shadow-lg);
    transition: var(--transition);
}

.about-image:hover {
    box-shadow: 0 15px 50px rgba(75, 194, 198, 0.35), var(--shadow-lg);
    transform: translateY(-4px);
}

.about-image::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    /* Diagonal gradient overlay - subtle and modern */
    background: linear-gradient(
        135deg, 
        rgba(75, 194, 198, 0.08) 0%, 
        transparent 35%, 
        transparent 65%, 
        rgba(75, 194, 198, 0.12) 100%
    );
    z-index: 2;
    pointer-events: none;
    border-radius: 18px;
    opacity: 1;
    transition: var(--transition);
}

.about-image:hover::before {
    background: linear-gradient(
        135deg, 
        rgba(75, 194, 198, 0.15) 0%, 
        transparent 30%, 
        transparent 70%, 
        rgba(75, 194, 198, 0.18) 100%
    );
}

.about-image img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
    position: relative;
    z-index: 1;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services {
    padding: 120px 0;
    background: var(--grey-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--white);
    padding: 48px 32px;
    border-radius: 12px;
    border: 1px solid var(--grey);
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    transform: scale(1.05);
}

.service-icon img {
    width: 36px;
    height: 36px;
    filter: invert(1);
}

.service-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
    margin-bottom: 24px;
}

.service-link {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    font-size: 15.2px;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--gold-dark);
    padding-left: 4px;
}

/* ============================================
   WHY CHOOSE US SECTION
   ============================================ */

.why-choose-us {
    padding: 120px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-card {
    position: relative;
    padding: 32px;
}

.feature-number {
    font-size: 64px;
    font-weight: 900;
    color: var(--gold);
    opacity: 0.15;
    position: absolute;
    top: 0;
    left: 0;
    line-height: 1;
}

.feature-card h3 {
    font-size: 22.4px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
    margin-top: 32px;
    letter-spacing: -0.02em;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */

.portfolio {
    padding: 120px 0;
    background: var(--grey-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26, 35, 50, 0.95) 0%, transparent 100%);
    padding: 32px;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay h4 {
    color: var(--gold);
    font-size: 20.8px;
    font-weight: 700;
    margin-bottom: 8px;
}

.portfolio-overlay p {
    color: var(--white);
    font-size: 16px;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonials {
    padding: 120px 0;
    background: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.testimonial-card {
    background: var(--grey-light);
    padding: 40px;
    border-radius: 12px;
    border-left: 4px solid var(--gold);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-content {
    margin-bottom: 32px;
}

.testimonial-content p {
    font-size: 16.8px;
    line-height: 1.8;
    color: var(--text-primary);
    font-style: italic;
}

.testimonial-content p::before {
    content: '"';
    font-size: 48px;
    color: var(--gold);
    opacity: 0.3;
    line-height: 0;
    display: block;
    margin-bottom: 8px;
}

.author-info h4 {
    font-size: 17.6px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.author-info span {
    font-size: 14.4px;
    color: var(--text-secondary);
}


/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--navy-dark);
    color: var(--text-light);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
    justify-content: end;
}

.footer-section.company-info {
    grid-column: -1;
    text-align: left;
}

.footer-logo {
    margin-bottom: 24px;
    display: flex;
    justify-content: flex-start;
}

.footer-logo img {
    height: 36px;
    width: auto;
    max-width: 180px;
    filter: brightness(0) invert(1);
    margin-bottom: 16px;
}

.footer-section.company-info h2,
.footer-section.company-info h3 {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0px;
    margin-top: 8px;
    text-align: left;
}

.footer-section.company-info .company-address {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    font-size: 15.2px;
    margin-bottom: 16px;
    text-align: left;
}

.footer-section.company-info .company-contact {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 15.2px;
    margin-bottom: 24px;
    text-align: left;
}

.footer-section.company-info .company-contact strong {
    color: var(--white);
    font-weight: 600;
}

.footer-section.company-info .company-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section.company-info .company-contact a:hover {
    color: var(--gold);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 15.2px;
}

.footer-section h4 {
    margin-bottom: 24px;
    color: var(--gold);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15.2px;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--gold);
    padding-left: 4px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--gold);
    transform: translateY(-2px);
}

.social-links a img {
    width: 24px;
    height: 24px;
    display: block;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14.4px;
    text-align: center;
    width: 100%;
}

.footer-bottom p {
    margin: 0;
    text-align: center;
    width: 100%;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .logo-img {
        height: 26px;
        max-height: 26px;
        max-width: 130px;
        min-width: 95px;
        width: 130px;
        /* Force fixed dimensions on iOS */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--grey);
        box-shadow: var(--shadow-sm);
        padding: 24px 32px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin-bottom: 16px;
    }

    .nav-menu li:last-child {
        margin-bottom: 0;
    }

    .hero {
        padding: 140px 0 80px;
        min-height: auto;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 44px;
        line-height: 1.15;
    }

    .hero-content p {
        font-size: 18px;
        max-width: 100%;
    }

    .cta-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 36px;
    }

    .services,
    .about,
    .portfolio,
    .testimonials,
    .why-choose-us {
        padding: 80px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        justify-content: center;
    }

    .footer-section.company-info {
        text-align: center;
        grid-column: auto;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-logo img {
        height: 32px;
    }

    .footer-section.company-info h2,
    .footer-section.company-info h3,
    .footer-section.company-info .company-address,
    .footer-section.company-info .company-contact {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .logo-img {
        height: 26px;
        max-height: 26px;
        max-width: 130px;
        min-width: 95px;
        width: 130px;
        /* Force fixed dimensions on iOS */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .navbar {
        padding: 16px 0;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-content h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 15px;
    }

    .section-header h2 {
        font-size: 28px;
        line-height: 1.25;
    }

    .section-description {
        font-size: 15px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    .feature-card h3 {
        font-size: 18px;
    }

    .about-text .lead {
        font-size: 18px;
    }

    .about-text p {
        font-size: 15px;
        text-align: justify;
    }

    body {
        font-size: 15px;
    }

    .services,
    .about,
    .portfolio,
    .testimonials,
    .why-choose-us {
        padding: 60px 0;
    }

    .service-card {
        padding: 32px 24px;
    }

    .service-card p {
        font-size: 15px;
        text-align: justify;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        padding: 14px 28px;
        font-size: 15px;
    }

    .footer-logo img {
        height: 28px;
    }

    .footer-bottom {
        font-size: 13px;
        padding-top: 24px;
    }

    .testimonial-content p {
        font-size: 15px;
        text-align: justify;
    }
}

/* iPhone Specific Fixes */
@media (max-width: 390px) {
    .logo-img {
        height: 26px;
        max-height: 26px;
        max-width: 130px;
        min-width: 95px;
        width: 130px;
        /* Force fixed dimensions on iOS */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .navbar {
        padding: 14px 0;
    }

    .container {
        padding: 0 16px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .section-header h2 {
        font-size: 24px;
    }
}

/* ============================================
   UTILITY & ANIMATIONS
   ============================================ */

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--gold);
    color: var(--navy);
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.hero-image,
.service-card,
.feature-card,
.portfolio-item,
.testimonial-card {
    animation: fadeInUp 0.8s ease-out forwards;
}