/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #121212;
    background-color: #fff;
    overflow-x: hidden;
}

/* CSS Variables for Brand Colors */
:root {
    --color-primary: #121212;
    --color-secondary: #E9F1F7;
    --color-accent: #FF931E;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --font-primary: 'Lato', sans-serif;
    --max-width: 1200px;
    --section-padding: 80px 0;
    --border-radius: 12px;
    --shadow: 0 10px 30px rgba(18, 18, 18, 0.1);
    --shadow-hover: 0 20px 40px rgba(18, 18, 18, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

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

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

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), #e8821a);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(255, 147, 30, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 147, 30, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header */
.header {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-top: 2px solid rgba(255, 147, 30, 0.3);
    transform: translateY(100%);
    animation: slideUpHeader 1s ease-out 0.5s forwards;
}

.header.scrolled {
    background: rgba(18, 18, 18, 0.98);
    box-shadow: 0 -15px 35px rgba(18, 18, 18, 0.2);
    border-top: 2px solid var(--color-accent);
}

.header.hiding {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.header.hiding[style*="opacity"] {
    animation: none !important;
}

.navbar {
    padding: 1.2rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Estilo especial para barra inferior */
.header {
    border-radius: 0;
    margin: 0;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(15px);
}

.header.scrolled {
    background: rgba(18, 18, 18, 0.98);
    box-shadow: 0 -20px 40px rgba(18, 18, 18, 0.15);
}

.nav-brand .logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Fallback for logo loading issues */
.nav-brand .logo:not([src]),
.nav-brand .logo[src=""] {
    display: none;
}

.nav-brand .logo::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    border-radius: 50%;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--color-white);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./../img/banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 25vh;
    padding: 0 2rem;
}

.hero-text {
    flex: 0 0 auto;
    text-align: left;
}

.hero-logo {
    position: absolute;
    right: 10rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    color: var(--color-white);
    margin-bottom: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    opacity: 0.9;
}

.hero-logo-img {
    max-width: 400px;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* Sections */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

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

/* About Section */
.about {
    background: var(--color-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.about-card {
    background: var(--color-white);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), #e8821a);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-accent), #e8821a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
    color: var(--color-white);
}

.about-card h3 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

/* Values Section */
.values {
    background: var(--color-primary);
    color: var(--color-white);
}

.values .section-title,
.values .section-subtitle {
    color: var(--color-white);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.value-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.value-icon {
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--color-white);
}

.value-card h4 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--color-secondary);
}

/* Contact Section */
.contact {
    background: var(--color-secondary);
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-form {
    width: 100%;
    max-width: 600px;
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 1rem;
}

.form-section-title {
    color: var(--color-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
}

.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background-color: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 147, 30, 0.1);
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-group select::-ms-expand {
    display: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.form-group.error input,
.form-group.error textarea {
    border-color: #e74c3c;
}

.form-group.error .error-message {
    opacity: 1;
}

.form-success {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.form-success.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-success i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.form-error {
    display: none;
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.form-error.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-error i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
}

.footer-brand .footer-logo {
    height: 50px;
    width: auto;
    max-width: 250px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.footer-tagline {
    color: var(--color-accent);
    font-style: italic;
}

.footer-links ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--color-white);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.footer-tech {
    color: var(--color-accent);
    font-style: italic;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpHeader {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        bottom: 70px;
        flex-direction: column;
        background-color: rgba(18, 18, 18, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 -10px 30px rgba(18, 18, 18, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        flex-direction: column;
        position: relative;
        padding: 0 1rem;
        margin-top: 20vh;
        width: calc(100% - 2rem);
        gap: 2rem;
        text-align: center;
    }
    
    .hero-logo {
        position: static;
        transform: none;
        order: 1;
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-logo-img {
        max-width: 200px;
        max-height: 120px;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
        white-space: normal;
    }
    
    .hero-subtitle {
        font-size: clamp(1.2rem, 6vw, 1.8rem);
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .form-section-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links ul {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section-padding {
        padding: 60px 0;
    }

    .hero-background {
        background-attachment: scroll;
    }

    .hero-content {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        margin-top: 15vh;
        gap: 1.5rem;
    }
    
    .hero-logo-img {
        max-width: 150px;
        max-height: 90px;
    }

    .contact-form {
        padding: 1rem;
    }

    .form-section-title {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .about-card {
        padding: 2rem 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.6);
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Remove outline from navigation links */
.nav-link:focus {
    outline: none;
}

/* Smooth scrolling for older browsers */
@supports not (scroll-behavior: smooth) {
    html {
        scroll-behavior: auto;
    }
}