/* --- RESET & VARIABLES --- */
:root {
    --primary: #000000;
    --secondary: #ffffff;
    --accent: #e10600;
    /* Tesla Red */
    --gray-dark: #1a1a1a;
    --gray-light: #f4f4f4;
    --text-color: #333333;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* Prevent font scaling in landscape on iOS */
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--secondary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Performance optimizations for images */
    content-visibility: auto;
    contain-intrinsic-size: 600px 400px;
}

video {
    /* Performance optimizations for video */
    will-change: transform;
}

button,
a,
input,
textarea {
    touch-action: manipulation;
    /* Better touch response */
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-pad {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--gray-light);
}

.bg-dark {
    background-color: var(--primary);
    color: var(--secondary);
}

.text-white {
    color: var(--secondary);
}

.text-center {
    text-align: center;
}

/* --- HEADER (UPDATED SIZES) --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 35px 0;
    /* Increased padding for bigger logo */
    transition: var(--transition);
    background: transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    padding: 25px 0;
    /* Shrinks slightly less on scroll now */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
    /* More space between icon and text */
    font-weight: 800;
    font-size: 2.4rem;
    /* INCREASED: Was 1.8rem */
    letter-spacing: 1px;
    color: var(--secondary);
    text-transform: uppercase;
}

.logo img {
    height: 85px;
    /* INCREASED: Was 60px */
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo {
    color: var(--primary);
}

/* Optional: Shrink logo slightly on scroll to save space */
header.scrolled .logo img {
    height: 70px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 1.2rem;
    /* INCREASED: Was 1.1rem */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    transition: color 0.3s;
}

header.scrolled .nav-links a {
    color: var(--primary);
}

.nav-links a:hover {
    color: var(--accent);
}

.mobile-menu-btn {
    display: none;
    /* Hidden by default, shown in media queries */
    color: var(--secondary);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    /* iOS minimum touch target */
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    user-select: none;
    -webkit-user-select: none;
}

.mobile-menu-btn:active {
    opacity: 0.7;
}

header.scrolled .mobile-menu-btn {
    color: var(--primary);
}

/* --- HERO SECTION (Video BG) --- */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--secondary);
    overflow: hidden;
    background-color: #000;
}

.back-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
    /* Performance optimizations for video */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 900px;
    margin-top: 60px;
    /* Offset to account for bigger header */
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -2px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 50px;
    opacity: 0.95;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 14px 40px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: transparent;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: var(--primary);
}

.btn-secondary {
    background-color: var(--accent);
    color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #c00500;
}

/* --- SERVICES --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    padding: 40px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
    border-top: 3px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--accent);
}

.icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.card p {
    font-size: 0.95rem;
    color: #666;
}

/* --- TRAINING --- */
.training-layout {
    display: flex;
    justify-content: center;
}

.training-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.training-list li {
    background: white;
    padding: 20px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- HANDS ON --- */
.large-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1px;
}

/* --- PROJECTS --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
}

.img-wrapper {
    height: 200px;
    overflow: hidden;
    background: #ddd;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.05);
}

.p-info {
    padding: 20px;
}

.p-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.p-info p {
    font-size: 0.9rem;
    color: #666;
}

/* --- JOIN TAGS --- */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.tag {
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-weight: 500;
    color: var(--gray-dark);
}

/* --- CONTACT --- */
#contact {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(225, 6, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

#contact .container {
    position: relative;
    z-index: 1;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    background: white;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.contact-info h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.contact-info>p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: var(--transition);
    border-left: 4px solid transparent;
    opacity: 0;
    animation: slideInLeft 0.6s ease forwards;
}

.contact-item:nth-child(3) {
    animation-delay: 0.1s;
}

.contact-item:nth-child(4) {
    animation-delay: 0.2s;
}

.contact-item:nth-child(5) {
    animation-delay: 0.3s;
}

.contact-item:nth-child(6) {
    animation-delay: 0.4s;
}

.contact-item:hover {
    background: #fff;
    border-left-color: var(--accent);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transform: translateX(5px);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-item strong {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.contact-item a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contact-item a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Add icons before contact links */
.contact-item a[href^="https://wa.me"]::before {
    content: '📱';
    font-size: 1.3rem;
}

.contact-item a[href^="mailto"]::before {
    content: '✉️';
    font-size: 1.3rem;
}

.contact-item a[href*="instagram"]::before {
    content: '📸';
    font-size: 1.3rem;
}

.map-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    height: 500px;
    position: relative;
    border: 3px solid white;
    transition: var(--transition);
}

.map-wrapper:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    transform: translateY(-5px);
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Contact CTA Enhancement */
#contact .section-header {
    margin-bottom: 60px;
}

#contact .section-header h2 {
    font-size: 2.8rem;
    color: var(--primary);
}

#contact .section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 15px auto 0;
}

/* Quick action buttons for contact */
.contact-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-actions .btn {
    flex: 1;
    min-width: 200px;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Override button styles for contact section */
.contact-actions .btn-primary {
    background-color: #25D366;
    /* WhatsApp green */
    border-color: #25D366;
    color: white;
}

.contact-actions .btn-primary:hover {
    background-color: #20BA5A;
    border-color: #20BA5A;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.contact-actions .btn-secondary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.contact-actions .btn-secondary:hover {
    background-color: #c00500;
    border-color: #c00500;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(225, 6, 0, 0.4);
}

/* --- FOOTER --- */
footer {
    background: var(--gray-dark);
    color: #888;
    padding: 40px 0;
    font-size: 0.9rem;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.socials {
    display: flex;
    gap: 20px;
}

.socials a {
    color: var(--secondary);
    font-weight: 500;
}

/* --- ANIMATIONS --- */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MEDIA QUERIES (Responsive Design) --- */

/* Tablets and smaller laptops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        font-size: 1.3rem;
    }

    .section-pad {
        padding: 80px 0;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .training-list ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    header {
        padding: 20px 0;
    }

    header.scrolled {
        padding: 15px 0;
    }

    .logo {
        font-size: 1.6rem;
    }

    .logo img {
        height: 60px;
    }

    .section-pad {
        padding: 60px 0;
    }

    .hero {
        height: 100vh;
        min-height: 600px;
    }

    .hero-content {
        padding: 20px;
        margin-top: 40px;
    }

    .hero h1 {
        font-size: 2.8rem;
        letter-spacing: -1px;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .cta-group {
        flex-direction: column;
        gap: 15px;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        padding: 16px 30px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .training-list ul {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        padding: 40px 30px;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    .map-wrapper {
        height: 350px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Active Mobile Menu */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100px;
        left: 0;
        width: 100%;
        background: white;
        padding: 30px;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .nav-links.active a {
        color: var(--primary);
        font-size: 1.2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .socials {
        justify-content: center;
    }

    .large-text {
        font-size: 1.5rem;
    }

    .tags-container {
        gap: 10px;
    }

    .tag {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    #contact .section-header h2 {
        font-size: 2.2rem;
    }

    #contact .section-header p {
        font-size: 1rem;
    }

    .contact-actions {
        flex-direction: column;
        gap: 12px;
    }

    .contact-actions .btn {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 15px 0;
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo img {
        height: 50px;
    }

    .mobile-menu-btn {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-content {
        padding: 15px;
        margin-top: 20px;
    }

    .section-pad {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    .card {
        padding: 30px 15px;
    }

    .icon {
        font-size: 2rem;
    }

    .card h3 {
        font-size: 1.1rem;
    }

    .training-list li {
        padding: 15px;
    }

    .project-card .p-info {
        padding: 15px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 14px 25px;
    }

    .large-text {
        font-size: 1.3rem;
    }

    .contact-info {
        padding: 30px 20px;
    }

    .contact-info h2 {
        font-size: 1.8rem;
    }

    .contact-info>p {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .contact-item {
        padding: 15px;
        margin-bottom: 20px;
    }

    .contact-item a {
        font-size: 1rem;
        word-break: break-word;
    }

    .map-wrapper {
        height: 300px;
    }

    #contact .section-header h2 {
        font-size: 1.8rem;
    }

    #contact .section-header p {
        font-size: 0.95rem;
    }

    .contact-actions {
        flex-direction: column;
        gap: 12px;
    }

    .contact-actions .btn {
        width: 100%;
        min-width: auto;
        justify-content: center;
        font-size: 0.9rem;
        padding: 14px 24px;
    }

    footer {
        padding: 30px 0;
    }

    .socials {
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* Small mobile phones */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 45px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.8rem;
    }
}