:root {
    --primary-color: #003f7f;
    --secondary-color: #4da6d4;
    --accent-color: #006bb6;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --header-bg-scrolled: rgba(255, 255, 255, 0.95);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}


/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    padding: 10px 20px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 5px 20px;
    border-radius: 36px;
    transition: all var(--transition-speed) ease;
}

/* Initial state (on hero) */
header.transparent .navbar {
    background: transparent;
    margin-top: 20px;
    color: var(--white);
}

header.transparent .nav-links a {
    color: var(--white);
}

header.transparent .logo img {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
}

/* Scrolled state */
header.scrolled .navbar {
    background: var(--header-bg-scrolled);
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

header.scrolled .nav-links a {
    color: var(--primary-color);
}

header.scrolled .logo img {
    filter: none;
}

.logo img {
    height: 60px;
    width: auto;
    transition: filter var(--transition-speed);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all var(--transition-speed);
}

header.transparent .hamburger span {
    background: var(--white);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: linear-gradient(rgba(0, 31, 63, 0.5), rgba(0, 63, 127, 0.6)), 
                      url('https://images.unsplash.com/photo-1605548838640-a33b5fcd891e?auto=format&fit=crop&w=1920&q=80');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    padding: 0 20px;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3));
    z-index: -1;
    opacity: 0;
    animation: fadeInOverlay 1.5s ease-out forwards;
    animation-delay: 0.5s;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    gap: 200px;
}

.hero-text-left {
    flex: 1;
    text-align: center;
}

.hero-text-right {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(50px);
    animation: slideUp 1s ease-out forwards;
    animation-delay: 2s;
}

.hero-logo-main {
    width: 350px;
    height: auto;
    margin-bottom: 30px;
    margin-left: 100px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translate(200px);
    animation: slideUp 0.8s ease-out forwards;
    animation-delay: 0.5s;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
    display: flex;
    flex-direction: column;
}

.hero-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out forwards;
}

.line-1 { animation-delay: 0.8s; }
.line-2 { animation-delay: 1.2s; }
.line-3 { animation-delay: 1.6s; }

@keyframes fadeInOverlay {
    to { opacity: 1; }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 30px;
    font-weight: bold;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

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

/* Sections General */
section {
    padding: 80px 20px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    text-align: center;
}

/* Services Home Section */
.services-home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 80px 100px;
    background: #f8f9fa;
    overflow: hidden; /* Prevent horizontal scroll from animations */
}

.services-home-secondary {
    background: var(--white);
}

.services-text {
    text-align: center;
}

.services-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.services-text p {
    margin-bottom: 20px;
    color: #555;
}

.services-logo {
    max-width: 150px;
    margin-bottom: 20px;
    display: inline-block;
    background: var(--white);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed);
    position: relative;
    height: 300px;
    opacity: 0;
    transform: translateX(300px);
}

.service-card.animate {
    animation: slideInRight 1s ease-out forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered delays for service cards */
.service-card:nth-child(1) { animation-delay: 0.2s; }
.service-card:nth-child(2) { animation-delay: 0.4s; }
.service-card:nth-child(3) { animation-delay: 0.6s; }
.service-card:nth-child(4) { animation-delay: 0.8s; }
.service-card:nth-child(5) { animation-delay: 1.0s; }
.service-card:nth-child(6) { animation-delay: 1.2s; }
.service-card:nth-child(7) { animation-delay: 1.4s; }

.service-card:hover {
    transform: translateY(-5px) !important;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-card:hover img {
    transform: scale(1.1);
}

.service-card h4 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 15px;
    text-align: center;
    font-size: 1rem;
}

/* Services Parallax Section */
.services-parallax {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    z-index: -1;
    filter: brightness(0.4);
}

.services-parallax-content {
    position: relative;
    z-index: 1;
    padding: 100px 40px;
    text-align: center;
}

.services-parallax-content h2 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.services-subtitle {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 60px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.parallax-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.parallax-card {
    position: relative;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s ease;
    background-size: cover;
    background-position: center;
}

.parallax-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 0;
}

.parallax-card[data-bg="images/buque1.jpg"]::before {
    background-image: url('images/buque1.jpg');
}

.parallax-card[data-bg="images/buque2.jpg"]::before {
    background-image: url('images/buque2.jpg');
}

.parallax-card[data-bg="images/buque3.jpg"]::before {
    background-image: url('images/buque3.jpg');
}

.parallax-card[data-bg="images/buque4.jpg"]::before {
    background-image: url('images/buque4.jpg');
}

.parallax-card:hover::before {
    transform: scale(1.1);
}

.parallax-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,63,127,0.3), rgba(0,63,127,0.9));
    z-index: 1;
    transition: background 0.3s ease;
}

.parallax-card:hover .parallax-card-overlay {
    background: linear-gradient(to bottom, rgba(0,107,182,0.5), rgba(0,63,127,0.95));
}

.parallax-card-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
}

.parallax-card-content h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.parallax-card-content p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.card-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.card-link:hover {
    color: var(--white);
    transform: translateX(5px);
}

.parallax-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* About Preview */
.about-preview {
    background-color: var(--light-bg);
    text-align: center;
    border-radius: 20px;
}

.about-preview p {
    margin: 0 auto 30px;
    max-width: 800px;
    line-height: 1.8;
    color: #555;
}

/* Contact Preview */
.contact-preview {
    text-align: center;
    background-image: linear-gradient(rgba(0, 63, 127, 0.7), rgba(0, 63, 127, 0.7)), 
                      url('https://images.unsplash.com/photo-1543593260-0b3a-2977-78ac-e0a26a02af71?auto=format&fit=crop&w=1920&q=80');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--white);
    border-radius: 36px;
    margin: 40px auto;
    max-width: 1200px;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.contact-preview p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 30px;
}

.contact-preview h2 {
    color: var(--white);
}

/* Modern Contact Styles */
.contact-section-modern {
    padding: 80px 20px;
}

.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
}

.contact-info {
    background: var(--primary-color);
    color: #fff;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h2 {
    color: #fff;
    text-align: left;
    margin-bottom: 30px;
}

.info-item {
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-item svg {
    width: 30px;
    height: 30px;
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 5px;
}

.info-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.info-item p {
    color: rgba(255,255,255,0.9);
}

.contact-form-modern {
    padding: 50px;
}

.contact-form-modern h2 {
    text-align: left;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

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

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: var(--accent-color);
}

/* Services Page Styles */
.services-hero-container {
    width: 100%;
    position: relative;
    height: 60vh; /* Reduced height better for inner pages usually, but let's stick to user intent or similar */
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1;
}

.square-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.services-overlay-text {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.services-overlay-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.service-detail {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 100px;
    padding-bottom: 60px;
    border-bottom: 1px solid #eee;
}

.service-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.service-item.reverse {
    flex-direction: row-reverse;
}

.service-content {
    flex: 1;
}

.service-content h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.service-content p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.service-image {
    flex: 1;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

.service-item:hover .service-image {
    transform: scale(1.02);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.footer-logo img {
    max-width: 150px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links h3,
.footer-social h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Clients Section */
.clients-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}

.clients-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.clients-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    position: relative;
    margin-bottom: 30px;
}

.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

.carousel-track {
    display: flex;
    gap: 40px;
    width: max-content;
}

.carousel-track-1 {
    animation: scroll-left 40s linear infinite;
}

.carousel-track-2 {
    animation: scroll-right 40s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-20%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-20%);
    }
    100% {
        transform: translateX(0);
    }
}

.client-card {
    background: var(--white);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.client-card img {
    width: 250px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: filter 0.3s ease;
    background-color: #000;
}

.client-card:hover img {
    filter: grayscale(0%) brightness(1);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Responsive Design */
@media (max-width: 900px) {
    .service-item, 
    .service-item.reverse {
        flex-direction: column;
        gap: 30px;
    }

    .service-image {
        height: 300px;
        width: 100%;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding: 40px;
    }

    .contact-form-modern {
        padding: 40px;
    }

    .clients-section h2 {
        font-size: 2rem;
    }

    .clients-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .client-card {
        min-width: 200px;
        padding: 20px 30px;
    }

    .client-card img {
        max-width: 140px;
        max-height: 60px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        left: -110%;
        top: 90px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 30px 0;
    }

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

    .nav-links a {
        color: var(--primary-color) !important;
        padding: 15px 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }


    .services-home {
        grid-template-columns: 1fr;
        padding: 60px 40px;
        gap: 40px;
    }

    .hero-content {
        flex-direction: column;
        gap: 50px;
    }

    .hero-text-left, 
    .hero-text-right {
        flex: 1;
        text-align: center;
    }
    .hero-logo-main{
        margin-left: 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .service-card {
        height: 200px;
    }

    .service-card h4 {
        font-size: 0.75rem;
        padding: 8px;
        line-height: 1.2;
    }

    .contact-preview {
        height: 50vh;
        padding: 20px;
    }
    .contact-preview h2 {
        font-size: 1.8rem;
    }

    .services-overlay-text h1 {
        font-size: 2.5rem;
    }

    .hero-image-wrapper {
        height: 60vh;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .parallax-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .parallax-card {
        height: 250px;
    }

    .parallax-card-content h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .parallax-card-content p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .parallax-card-content {
        padding: 20px;
    }

    .services-parallax-content {
        padding: 60px 20px;
    }

    .services-parallax-content h2 {
        font-size: 2rem;
    }

    .services-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .parallax-bg {
        background-attachment: scroll;
        background-image: url('images/fondocelu.jpg') !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--secondary-color);
    color: var(--white);
}
