/* VíaDomótica - Global Styles */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #0066cc;
    --primary-dark: #004d99;
    --secondary-color: #00cc66;
    --accent-color: #ff9900;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --bg-dark: #2a2a2a;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: var(--text-dark); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== NAVIGATION ===== */
.navbar { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 1000; transition: var(--transition); }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 1rem 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }
.logo-icon { font-size: 2rem; }
.nav-menu { display: flex; gap: 2rem; align-items: center; }
.nav-menu a { padding: 0.5rem 1rem; transition: var(--transition); }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); }
.menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.menu-toggle span { width: 25px; height: 3px; background: var(--text-dark); transition: var(--transition); }
.lang-switcher { position: relative; }
.lang-btn { background: var(--primary-color); color: var(--white); border: none; padding: 0.5rem 1rem; border-radius: 5px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.lang-dropdown { position: absolute; top: 100%; right: 0; background: var(--white); box-shadow: var(--shadow); border-radius: 5px; margin-top: 5px; display: none; min-width: 150px; }
.lang-dropdown.active { display: block; }
.lang-dropdown button { width: 100%; padding: 0.75rem 1rem; border: none; background: none; text-align: left; cursor: pointer; transition: var(--transition); }
.lang-dropdown button:hover { background: var(--bg-light); }

/* Mobile Menu */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-menu { position: fixed; left: -100%; top: 70px; flex-direction: column; background: var(--white); width: 100%; padding: 2rem; box-shadow: var(--shadow); transition: var(--transition); }
    .nav-menu.active { left: 0; }
}

/* ===== SECTIONS ===== */
.section { padding: 4rem 0; }
.section-dark { background: var(--bg-dark); color: var(--white); }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; }
.section-subtitle { font-size: 1.2rem; text-align: center; color: var(--text-light); margin-bottom: 3rem; }
.section-dark .section-subtitle { color: #ccc; }

/* ===== HERO SECTION ===== */
.hero { 
    position: relative; 
    min-height: 600px; 
    display: flex; 
    align-items: center; 
    /* Fallback gradient */
    background: linear-gradient(135deg, rgba(0, 102, 204, 1), rgba(0, 77, 153, 1));
    /* Background image with multiple path options */
    background-image: url('/images/team-speaker-install.png'), url('images/team-speaker-install.png'), url('../images/team-speaker-install.png'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    color: var(--white); 
    text-align: center; 
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0, 102, 204, 0.85), rgba(0, 77, 153, 0.75)); }
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.3rem; margin-bottom: 2rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-stats { display: flex; gap: 3rem; justify-content: center; margin: 2rem 0; }
.stat { display: flex; flex-direction: column; }
.stat-number { font-size: 3rem; font-weight: bold; }
.stat-label { font-size: 1rem; opacity: 0.9; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 1rem 2rem; border-radius: 5px; font-weight: 600; transition: var(--transition); cursor: pointer; border: none; font-size: 1rem; }
.btn-primary { background: var(--secondary-color); color: var(--white); }
.btn-primary:hover { background: #00a352; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: var(--white); color: var(--primary-color); }

/* ===== SERVICES ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { background: var(--white); padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); transition: var(--transition); }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.service-icon { font-size: 3rem; margin-bottom: 1rem; }
.service-card h3 { color: var(--primary-color); margin-bottom: 1rem; }
.service-list { margin: 1rem 0; }
.service-list li { padding: 0.5rem 0; padding-left: 1.5rem; position: relative; }
.service-list li::before { content: '✓'; position: absolute; left: 0; color: var(--secondary-color); font-weight: bold; }
.service-link { color: var(--primary-color); font-weight: 600; display: inline-block; margin-top: 1rem; }

/* ===== SECTORS ===== */
.sectors-grid { display: grid; gap: 3rem; }
.sector-card { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.section-dark .sector-card { background: #3a3a3a; }
.sector-image { width: 100%; height: 100%; object-fit: cover; }
.sector-content { padding: 2rem; }
.sector-content h3 { color: var(--primary-color); margin-bottom: 1rem; font-size: 1.8rem; }
.sector-benefits { margin-top: 1rem; }
.sector-benefits li { padding: 0.5rem 0; padding-left: 1.5rem; position: relative; }
.sector-benefits li::before { content: '▪'; position: absolute; left: 0; color: var(--secondary-color); }

@media (max-width: 768px) {
    .sector-card { grid-template-columns: 1fr; }
}

/* ===== PROCESS ===== */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.process-step { text-align: center; padding: 2rem; }
.step-number { width: 60px; height: 60px; background: var(--primary-color); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; margin: 0 auto 1rem; }
.process-step h3 { color: var(--primary-color); margin-bottom: 0.5rem; }

/* ===== WHY US ===== */
.why-us-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.why-card { background: #3a3a3a; padding: 2rem; border-radius: 10px; text-align: center; }
.why-icon { font-size: 3rem; margin-bottom: 1rem; }
.why-card h3 { margin-bottom: 1rem; }

/* ===== GALLERY ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; overflow: hidden; border-radius: 10px; cursor: pointer; height: 250px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-overlay { position: absolute; inset: 0; background: rgba(0,102,204,0.9); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); color: var(--white); font-weight: bold; font-size: 1.2rem; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-cta { text-align: center; margin-top: 3rem; }

/* ===== VIDEO SECTION ===== */
.video-section { 
    background: var(--bg-light); 
    padding: 4rem 0;
    text-align: center;
}
.video-section .section-title,
.video-section .section-subtitle {
    text-align: center;
}
.video-container { 
    max-width: 1000px;  /* Увеличено с 900px до 1000px */
    margin: 0 auto; 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: var(--shadow-lg);
    display: block;
    text-align: center;
}
.video-container video { 
    width: 100%; 
    max-width: 100%;
    height: auto; 
    display: block; 
    background: #000;
    margin: 0 auto;
}

/* ===== CTA ===== */
.cta { text-align: center; padding: 5rem 0; }
.cta h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ===== FOOTER ===== */
.footer { background: var(--bg-dark); color: var(--white); padding: 3rem 0 1rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h3, .footer-section h4 { color: var(--secondary-color); margin-bottom: 1rem; }
.footer-address { margin-top: 1rem; line-height: 1.8; }
.footer-links li, .footer-contact li { padding: 0.5rem 0; }
.footer-links a:hover, .footer-contact a:hover { color: var(--secondary-color); }
.footer-bottom { border-top: 1px solid #444; padding-top: 1rem; text-align: center; }

/* ===== PAGE HEADER ===== */
.page-header { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); color: var(--white); padding: 4rem 0; text-align: center; }
.page-header h1 { font-size: 3rem; margin-bottom: 1rem; }

/* ===== SERVICE DETAIL ===== */
.service-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.service-detail-grid.reverse { direction: rtl; }
.service-detail-grid.reverse > * { direction: ltr; }
.service-icon-large { font-size: 4rem; margin-bottom: 1rem; }
.service-detail-list { margin: 1.5rem 0; }
.service-detail-list li { padding: 1rem 0; border-bottom: 1px solid #eee; }
.section-dark .service-detail-list li { border-bottom-color: #444; }
.service-highlight { background: var(--secondary-color); color: var(--white); padding: 1.5rem; border-radius: 10px; margin-top: 2rem; }

@media (max-width: 768px) {
    .service-detail-grid { grid-template-columns: 1fr; }
}

/* ===== FAQ ===== */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: #3a3a3a; margin-bottom: 1rem; border-radius: 10px; overflow: hidden; }
.faq-question { width: 100%; padding: 1.5rem; background: none; border: none; color: var(--white); text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 600; }
.faq-icon { transition: var(--transition); }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-answer { padding: 0 1.5rem; max-height: 0; overflow: hidden; transition: var(--transition); }
.faq-item.active .faq-answer { padding: 0 1.5rem 1.5rem; max-height: 500px; }

/* ===== PROJECTS ===== */
.filter-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.filter-btn { padding: 0.75rem 1.5rem; background: var(--white); border: 2px solid var(--primary-color); color: var(--primary-color); border-radius: 25px; cursor: pointer; transition: var(--transition); font-weight: 600; }
.filter-btn:hover, .filter-btn.active { background: var(--primary-color); color: var(--white); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2rem; }
.project-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.project-card img { width: 100%; height: 250px; object-fit: cover; }
.project-card-content { padding: 1.5rem; }
.project-category { display: inline-block; background: var(--primary-color); color: var(--white); padding: 0.25rem 0.75rem; border-radius: 15px; font-size: 0.85rem; margin-bottom: 0.5rem; }
.project-card h3 { color: var(--primary-color); margin-bottom: 0.5rem; }
.project-location, .project-area { color: var(--text-light); font-size: 0.9rem; margin: 0.25rem 0; }
.project-stats { display: flex; gap: 1rem; margin-top: 1rem; font-size: 0.9rem; color: var(--text-light); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.stat-card { text-align: center; padding: 2rem; background: #3a3a3a; border-radius: 10px; }
.stat-number-large { display: block; font-size: 3.5rem; font-weight: bold; color: var(--secondary-color); }
.stat-label-large { display: block; margin-top: 0.5rem; }

/* ===== SCHEMA PAGE ===== */
.schema-intro-content { max-width: 900px; margin: 0 auto; font-size: 1.1rem; line-height: 1.8; }
.diagram-container { background: var(--white); padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); }
.schema-svg { width: 100%; height: auto; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.spec-card { background: var(--white); padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); text-align: center; }
.spec-icon { font-size: 3rem; margin-bottom: 1rem; }
.spec-value { font-size: 2.5rem; font-weight: bold; color: var(--primary-color); margin: 1rem 0; }
.equipment-list { max-width: 900px; margin: 0 auto; }
.equipment-item { display: flex; gap: 1.5rem; padding: 1.5rem; background: #3a3a3a; border-radius: 10px; margin-bottom: 1rem; }
.equipment-number { font-size: 2rem; font-weight: bold; color: var(--secondary-color); min-width: 80px; }
.equipment-details h4 { margin-bottom: 0.5rem; }
.results-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 1000px; margin: 0 auto; }
.result-column { background: var(--white); padding: 2rem; border-radius: 10px; }
.result-column h3 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.result-column ul li { padding: 0.75rem 0; padding-left: 1.5rem; position: relative; }

@media (max-width: 768px) {
    .results-comparison { grid-template-columns: 1fr; }
}

/* ===== CONTACT PAGE ===== */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; }
.contact-form-container { background: var(--white); padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; font-size: 1rem; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); }
.contact-info-card, .contact-why-card { background: var(--white); padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 2rem; }
.contact-info-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact-icon { font-size: 2rem; min-width: 40px; }
.contact-info-item h4 { color: var(--primary-color); margin-bottom: 0.5rem; }
.contact-why-list li { padding: 0.75rem 0; }

@media (max-width: 968px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* ===== BACK TO TOP ===== */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; background: var(--primary-color); color: var(--white); border: none; border-radius: 50%; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: var(--shadow); transition: var(--transition); z-index: 999; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-5px); }
.back-to-top.visible { display: flex; }

/* ===== 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 ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .section-title { font-size: 2rem; }
    .page-header h1 { font-size: 2rem; }
    
    /* Video section mobile */
    .video-container { 
        max-width: 100%; 
        margin: 0 10px;
        border-radius: 10px;
    }
}