/* 
   Theme: EMTI Professional (Blue/Orange/White)
   Author: Martín Torres
   Description: Clean, high-performance, mobile-first CSS.
*/

:root {
    /* Brand Colors */
    --primary: #0f4c81;
    /* Classic Blue - Trust & Professionalism */
    --primary-dark: #0a3d6b;
    --secondary: #f57c00;
    /* Vibrant Orange - Action & Energy */
    --secondary-hover: #e65100;

    /* Neutrals */
    --bg-light: #ffffff;
    --bg-gray: #f8f9fa;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-sm: 4px;
    --radius-md: 8px;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition: 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.text-orange {
    color: var(--secondary);
}

.section-padding {
    padding: 4rem 0;
}

.bg-gray {
    background-color: var(--bg-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Header */
.header {
    height: var(--header-height);
    background-color: var(--bg-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: none;
    /* Mobile hidden by default */
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-gray) 100%);
}

.hero-subtitle {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(15, 76, 129, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.project-img-wrapper {
    position: relative;
    padding-top: 60%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #f0f0f0;
}

.project-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background-color: var(--bg-gray);
    color: var(--text-muted);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--secondary);
}

.service-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--primary);
}

/* Contact Form */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: white;
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

/* Desktop Media Query */
@media (min-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    .menu-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        gap: 2rem;
        align-items: center;
    }

    .nav-link {
        font-weight: 500;
        color: var(--text-main);
    }

    .nav-link:hover {
        color: var(--primary);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}