/* CSS Variables */
:root {
    --primary-color: #41beba;
    --secondary-color: #211b1e;
    --tertiary-color: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--tertiary-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--tertiary-color);
}

.btn-primary:hover {
    background-color: #36a9a5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--tertiary-color);
}

/* Header */
.header {
    background-color: var(--tertiary-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 95px; /* Increased from 60px to 90px (150% increase) */
}

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

.nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    position: relative;
}

.nav-link.active,
.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicators {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.station-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--medium-gray);
}

.status-dot.open {
    background-color: var(--success-color);
}

.status-dot.closed {
    background-color: var(--error-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    color: var(--tertiary-color);
    padding: 8rem 0;
    text-align: center;
    /* Fallback background color in case video doesn't load */
    background-color: var(--secondary-color);
    overflow: hidden;
    min-height: 500px;
    /* Ensure no background image is set */
    background-image: none !important;
}

/* Hero video background */
#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: block !important;
}

/* Hero overlay for text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(33, 27, 30, 0.7), rgba(33, 27, 30, 0.7));
    z-index: 2;
}

/* Hero content positioning */
.hero-content {
    position: relative;
    z-index: 3;
}

/* Fallback for when video doesn't load */
.hero.no-video {
    background: linear-gradient(rgba(33, 27, 30, 0.7), rgba(33, 27, 30, 0.7));
    background-size: cover;
    background-position: center;
}

.hero.no-video .hero-overlay {
    display: none;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Status Section */
.status-section {
    padding: 4rem 0;
    background-color: var(--light-gray);
}

.status-section h2 {
    position: relative;
    padding-bottom: 0.5rem;
}

.status-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

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

.station-card {
    background-color: var(--tertiary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: var(--transition);
}

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

.station-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.status-display {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.status-indicator.large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.status-indicator.large .status-dot {
    width: 15px;
    height: 15px;
}

.schedule-days {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.day {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 4px;
}

.day:nth-child(odd) {
    background-color: var(--light-gray);
}

.day-name {
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
}

.services h2 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.services h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(65, 190, 186, 0.1), transparent);
    animation: slideIn 8s ease-in-out infinite;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.service-card {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(65, 190, 186, 0.1), transparent);
    transition: left 0.6s ease;
}

/* Removed hover effect on service card before pseudo-element */

.service-card:hover {
    /* Removed hover effects */
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.service-card:hover .service-icon {
    /* Removed icon rotation and color change on hover */
}

/* Removed hover effect when cursor is over icon */

.service-card h3 {
    margin-bottom: 1rem;
    transition: var(--transition);
}

.service-card:hover h3 {
    /* Removed title color and transform effects on hover */
}

/* Animation keyframes */
@keyframes slideIn {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Add floating animation to service cards */
.service-card:nth-child(1) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 0s;
}

.service-card:nth-child(2) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

.service-card:nth-child(3) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 4s;
}

/* Featured Products Section */
.featured-products {
    padding: 4rem 0;
    background-color: var(--light-gray);
}

.featured-products h2 {
    position: relative;
    padding-bottom: 0.5rem;
}

.featured-products h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background-color: var(--tertiary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.product-price {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.add-to-cart {
    width: 100%;
}

/* Useful Links Section */
.useful-links {
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
}

.useful-links h2 {
    position: relative;
    padding-bottom: 0.5rem;
}

.useful-links h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.useful-links::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(65, 190, 186, 0.1), transparent);
    animation: slideIn 8s ease-in-out infinite;
}

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

.link-card {
    display: block;
    background-color: var(--tertiary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 0.8rem 1.5rem; /* Reduced padding */
    text-align: center;
    transition: var(--transition);
    color: var(--secondary-color);
    position: relative;
    overflow: hidden;
    min-height: 300px; /* Reduced height from 420px to 300px */
    max-width: 280px; /* Added max-width to control card size */
    margin: 0 auto; /* Center the cards */
}

/* Background image for Capitania do Porto de Setúbal card */
.capitania-card {
    background-image: url('./img/capitania.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Overlay for text readability on image background */
.capitania-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    z-index: 1 !important;
}

/* Ensure content is above the overlay */
.capitania-card > * {
    position: relative !important;
    z-index: 2 !important;
}

/* Background image for Escola Náutica Aquamaster card */
.aquamaster-card {
    background-image: url('./img/aquamaster.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Overlay for text readability on image background */
.aquamaster-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    z-index: 1 !important;
}

/* Ensure content is above the overlay */
.aquamaster-card > * {
    position: relative !important;
    z-index: 2 !important;
}

/* Background image for Meteorologia card */
.meteorologia-card {
    background-image: url('./img/meteorologia.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Overlay for text readability on image background */
.meteorologia-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    z-index: 1 !important;
}

/* Ensure content is above the overlay */
.meteorologia-card > * {
    position: relative !important;
    z-index: 2 !important;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    color: var(--primary-color);
}

.link-icon {
    font-size: 2rem; /* Reduced from 3rem to 2rem */
    color: var(--primary-color);
    margin-bottom: 0.8rem; /* Reduced margin */
}

.link-card h3 {
    margin-bottom: 0.5rem;
}

/* Add floating animation to link cards */
.link-card:nth-child(1) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 0s;
}

.link-card:nth-child(2) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

.link-card:nth-child(3) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 4s;
}

/* Footer styles moved to footer-component.js web component */

/* Cart Button */
.cart-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--tertiary-color);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-button:hover {
    background-color: #36a9a5;
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--error-color);
    color: var(--tertiary-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background-color: var(--tertiary-color);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.modal-header h2 {
    margin-bottom: 0;
    text-align: left;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--medium-gray);
}

/* Cart Items */
.cart-items {
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--medium-gray);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-color);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--medium-gray);
    background-color: var(--tertiary-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: var(--light-gray);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    margin-left: 1rem;
}

.cart-summary {
    border-top: 1px solid var(--medium-gray);
    padding-top: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
}

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

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-message i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

/* Text Center */
.text-center {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stations-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        display: none;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 2;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .schedule-days {
        grid-template-columns: 1fr;
    }
    
    /* Footer responsive styles moved to footer-component.js web component */
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}